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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
<div class="texteradio2">
<?
$ip = "www.media-tchat.org";
$port = "8000";
$fp = @fsockopen("$ip", "$port", $errno, $errstr, 30);
if(!$fp)
{
$auditeurs = "0";
$places = "0";
$etat = "Serveur déconnecté.";
}
else
{
fputs($fp, "GET /7.html HTTP/1.0\r\nUser-Agent: Mozilla/4.0\r\n\r\n");
while(!feof($fp))
{
$content .= fgets($fp,128);
}
fclose($fp);
$debut = strpos($content, '<body>') + strlen('<body>');
$fin = strpos($content, '</body>', $debut);
$servi = substr($content, $debut, $fin - $debut);
$option = explode(',', $servi);
if ($option[1] == 0)
{
$auditeurs = "0";
$places = "0";
$etat = "Aucune source serveur connectée.";
}
else
{
$auditeurs = $option[0];
$pointe = $option[2];
$places = $option[3];
$bitrate = $option[5];
$titre = $option[6];
$etat = "Source connectée serveur connecté serveur Ok !";
}
}
echo "$titre";
?>
</div> |
Partager