Parašė KIRIL· 2011 Lap. 24 19:11:55
#1
Gal kas turit ar žinot kur galima būtų surast
html counter-strike monitoriu?
Kaško panašaus į
www.silent.lt, nebutina žemėlapis.
Labai reiktu.
Parašė KIRIL· 2011 Lap. 25 14:11:06
#3
Atsiprašau nelabai aš moku, va pavizdžiui yra panelė skirta
php, ar galima ja į
html perdaryt?
(reikia <?php reikia keist į <?html ar kaip?)
openside("Serverio Statistika"); ?>
<?php
$ip = $_GET['ipas'];
$port = $_GET['portas'];
$packet = "\xFF\xFF\xFF\xFFTSource Engine Query\x00";
function getnextstring(&$data)
{
$temp="";
$counter=0;
while (ord($data[$counter++])!=0) $temp.=$data[$counter-1];
$data=substr($data,strlen($temp)+1);
return $temp;
}
function getnextbytevalue(&$data)
{
$temp=ord($data[0]);
$data=substr($data,1);
return $temp;
}
if(!$live_server = fsockopen("udp://################"))
{
$output = "on";
}
else
{
fwrite($live_server, $packet);
socket_set_timeout($live_server,1,0);
$junk = fread($live_server,5);
$status = socket_get_status($live_server);
$do = 1;
$server_info= "";
while($do)
{
$str_1 = fread($live_server,1);
$server_info .= $str_1;
$status = socket_get_status($live_server);
if($status["unread_bytes"] == 0) {$do = 0;}
}
fclose($live_server);
if (strlen($server_info) > 0)
{
$success = 1;
$junk = getnextstring($server_info);
$servername = getnextstring($server_info);
$map = getnextstring($server_info);
$junk = getnextstring($server_info);
$junk = getnextstring($server_info);
$players = getnextbytevalue($server_info);
$maxplayers = getnextbytevalue($server_info);
}
if ($players != "")
{
$players = $players;
}
else
{
$players = "0";
}
if ($maxplayers != "")
{
$maxplayers = $maxplayers;
}
else
{
$maxplayers = "0";
}
if ($players < $maxplayers)
{
$output = "<img src=####JUSU ADRESAS IKI PAVEIKSLELIO####/images/online.gif>";
}
else
{
$output = "Full";
}
if ($output != "Full" and $players != "0" or $maxplayers != "0")
{
$output = $output;
}
else
{
$output = "<img src=####JUSU ADRESAS IKI PAVEIKSLELIO####/images/offline.gif>";
}
if ($map != "")
{
$map = $map;
}
else
{
$map = "nera";
}
echo'
<center>
<span style=color:blue>SERVAS</span>
<TABLE class = tbl2 border=1>
<TR>
<TD class = tbl2>
<center>
<img src="img/maps/'.$map.'.jpg" alt="'.$map.'"></center>
</TD>
<TD class = tbl2>
Serverio ip : #####<br/><br>
Serverio portas : ######<br/><br>
Zemelapis : <span style=color:orange>'.$map.'</span><br/><br>
Zaidejai : <a href="/cs/viewpage.php?page_id=2"><span style=color:green>'.$players.'</span>/<span style=color:red>'.$maxplayers.'</span><br/></a><br>
Serverio busena: '.$output.'<br/>
</TD>
</TR>
</TABLE>
</center>';
}
?>
<?php closeside();
Parašė etr· 2011 Lap. 25 19:11:15
#4
Galima rakinti, išspręsta.