<?PHP
$port = 10010;
function getServerAPI( $apiCommand )
{
global $port;
$result = "";
$fp = fsockopen("support-zentrale.info", $port, &$errno, &$errstr, 30);
if(!$fp)
{
echo "$errstr ($errno)\n";
}
else
{
fputs($fp,"GET /?".$apiCommand." HTTP/1.0\n\n");
while(!feof($fp))
{
$result .= fgets($fp,128);
}
fclose($fp);
}
return $result;
}
$userCount = getServerAPI( "api.UserCount" );
$userInRoom = getServerAPI( "api.PeopleInRoom=Flugzeug-Chat" );
$tmp = strtr($userInRoom, "\n", ",");
$tmp = explode(",", $tmp );
if($tmp[0] == "ERROR: Room empty.") $AnzahlUserInRoom = 0;
else $AnzahlUserInRoom = count($tmp) - 1;
if($userCount == "")
{
echo 'Der Chat ist momentan offline.';
exit;
}
if ($AnzahlUserInRoom == "1") {
echo "Es ist <b>".$AnzahlUserInRoom."</b> User im Chat.";
} else {
echo "Es sind <b>".$AnzahlUserInRoom."</b> User im Chat.";
};
?>
$port = 10010;
function getServerAPI( $apiCommand )
{
global $port;
$result = "";
$fp = fsockopen("support-zentrale.info", $port, &$errno, &$errstr, 30);
if(!$fp)
{
echo "$errstr ($errno)\n";
}
else
{
fputs($fp,"GET /?".$apiCommand." HTTP/1.0\n\n");
while(!feof($fp))
{
$result .= fgets($fp,128);
}
fclose($fp);
}
return $result;
}
$userCount = getServerAPI( "api.UserCount" );
$userInRoom = getServerAPI( "api.PeopleInRoom=Flugzeug-Chat" );
$tmp = strtr($userInRoom, "\n", ",");
$tmp = explode(",", $tmp );
if($tmp[0] == "ERROR: Room empty.") $AnzahlUserInRoom = 0;
else $AnzahlUserInRoom = count($tmp) - 1;
if($userCount == "")
{
echo 'Der Chat ist momentan offline.';
exit;
}
if ($AnzahlUserInRoom == "1") {
echo "Es ist <b>".$AnzahlUserInRoom."</b> User im Chat.";
} else {
echo "Es sind <b>".$AnzahlUserInRoom."</b> User im Chat.";
};
?>
Warning: file("http://www.flugzeuginformation.de/php/chat_code.php3") - Success in /home/www/netsh255/html/php/index.php on line 261
Warning: Bad arguments to implode() in /home/www/netsh255/html/php/index.php on line 261
Warning: Bad arguments to implode() in /home/www/netsh255/html/php/index.php on line 261
MFG Kraut
Kommentar