- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
<?php
$qw=chr(32);
$fp = fsockopen ("udp://77.239.192.43",28960, $errno, $errstr);
if (!$fp)
{
return("Error");
}
else
{
fwrite($fp,"яяяяinfo");
socket_set_timeout($fp,2,1);
$st=fread($fp,1);
print_r($st);
$r=socket_get_status($fp);
$r=$r["unread_bytes"];
@$st.=fread($fp,$r);
fclose($fp);
$tmp2=strpos($st,"sv_maxclients");
$tmp1=strpos($st,"clients")+9;
$players = 0;
$map=SubStr($st,0,StrPos($st,chr(0)));
$show_map="<img src=./maps/".$map.".jpg width=\"160\" height=\"120\">";
if (($tmp2-$tmp1) >= 0)
{
$players=substr($st,$tmp1,$tmp2-$tmp1);
$tmp2=strpos($st,"mapname")+8;
$map = substr($st,$tmp2,$tmp1-$tmp2-9);
}
}
echo "";
echo ("
<b><font color=\"#000000\">Call of Duty2</font></b>
<br>
<b><font color=\"#000000\">$show_map</font></b>
<br>
<b><font color=\"#000000\">Игроков: $players</font></b>
");
?>
guest 02.06.2009 12:27 # −1
guest 02.06.2009 22:38 # 0
o_O \xFF\xFF\xFF\xFF