7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function contactGameserver ($Host, $GameID, $SaltString = "", $Debug = false)
{
$Port = 9003;
$DecryptedPass = "xxx";
$ErrNo = "";
$ErrStr = "";
$TCP = fsockopen ($Host, $Port, &$ErrNo, &$ErrStr, 10); // <-- 30 sek Timeout
if (!$TCP) {
if ($Debug) {
echo "$ErrStr ($ErrNo)<br />\n";
}
return false;
} else {
if ($SaltString != "") {
$EncryptedPass = crypt($DecryptedPass, $SaltString);
} else {
$EncryptedPass = crypt($DecryptedPass);
}
fwrite ($TCP, "$EncryptedPass:$GameID");
$Return = fread($TCP, 34);
list($retval, $dummy) = split(":", $Return, 2);
fclose($TCP);
return $retval;
}
}
7 Einträge, 1 Seite |