Pour environ la 5ème fois (si ce n'est plus):
télécharger et installer le jdk 7
mettre la variable d'environnement JAVA_HOME en place sur le pc(cf les premiers poste du topic....)
Ne pas mettre MLC.exe sur le bureau tout seul, pour certains pc ça ne marche pas , le mettre dans un répertoire.
PS : SVP lisez les postes avant de poser des questions sinon c'est pas gérable :s
<?php
header('Content-Type: application/json');
include('config.php');
include('errors.php');
if(system_used() == "database")
{
if($_SERVER['REQUEST_METHOD'] == "POST")
{
$input = file_get_contents("php://input");
if(json_decode($input) != NULL)
{
$decode = json_decode($input, true);
$u = $decode['user_pseudo'];
if(authenticate($u))
{
echo "User ".$u." exists.";
}
else
{
echo show_error(3);
}
}
else
{
echo show_error(6);
}
}
else
{
echo show_error(1);
}
}
else
{
if($_SERVER['REQUEST_METHOD'] == "POST")
{
$input = file_get_contents("php://input");
if(json_decode($input) != NULL)
{
$decode = json_decode($input, true);
$u = $decode['user_pseudo'];
$searchfor = $u;
$file = file_get_contents(get_filename());
if(strpos($file, $searchfor) !== FALSE)
{
echo "User ".$searchfor." exists";
}
else
{
echo show_error(3);
}
}
else
{
echo show_error(6);
}
}
else
{
echo show_error(1);
}
}
function authenticate($u)
{
if($u != NULL)
{
$query1 = mysqli_query(db_connect(), "SELECT COUNT(*) AS exist FROM joueurs WHERE user_pseudo = '$u'") or die(mysqli_error(db_connect()));
$sqlArray = mysqli_fetch_array($query1);
if($sqlArray['exist'] != 0)
{
return true;
}
else
{
return false;
}
}
else
{
return false;
}
}
?>
<?php
/*
AwayDrasil Authentication Server.
Author : Jambonlatex
This files will help you to create a new authentication service based on Yggdrasil authentication project.
It could be very useful for big personnal servers.
*/
/*This is the configuration file, everything you need to setup is here */
// SYSTEM_USED : Here enter 'database' to use database verification system, or enter 'whitelist' to use whitelist file verification.
$systemUsed = 'database';
// HOSTNAME : Define your hostname (http://localhost/ for local user)
$cfg_hostname = 'http://mc-empirecraft.fr/remote/';
// DATABASE : Define all database configuration parameters to permit the access of custom members database
$cfg_db_host = 'sql-1.verygames.net';
$cfg_db_username = '**********';
$cfg_db_password = '*********';
$cfg_db_database = '*******';
// FOR WHITELIST USER : enter your whitelist path here :
$filename = 'http://mc-empirecraft.fr/remote/whitelist.txt';
//END OF THE CONFIGURATION//
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/*REFERENCE FUNCTIONS*/
//TOUCH THIS PART ONLY IF YOU KNOW WHAT YOU DO !
function db_connect(){
global $cfg_db_host, $cfg_db_username, $cfg_db_password, $cfg_db_database;
$db = mysqli_connect($cfg_db_host, $cfg_db_username, $cfg_db_password, $cfg_db_database);
if (mysqli_connect_errno($db))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
return $db;
}
function base_url()
{
global $cfg_hostname;
return $cfg_hostname;
}
function system_used(){
global $systemUsed;
return $systemUsed;
}
function get_filename(){
global $filename;
return $filename;
}
?>
[COLOR=#000000][COLOR=#ff8000]// HOSTNAME : Define your hostname (http://localhost/ for local user)[/COLOR][COLOR=#0000bb]$cfg_hostname [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]'http://mc-empirecraft.fr/remote/'[/COLOR][COLOR=#007700];
[COLOR=#000000][COLOR=#ff8000]// HOSTNAME : Define your hostname (http://localhost/ for local user)[/COLOR][COLOR=#0000bb]$cfg_hostname [/COLOR][COLOR=#007700]= [/COLOR][COLOR=#dd0000]'http://localhost/remote/'[/COLOR][COLOR=#007700];