Jak mogę temu zapobiec?
array('46.4.xx.xx',8315), ); ?> <DOCTYPE html> <html> <head> <title>DDracemaX Status</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <style type="text/css"> body { background-color: White; font-family:Verdana, Geneva, sans-serif; } #status{ width: 740px; background-color: #4A4F7A; padding: 30px; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; color:#18CDCA; font-size: 28px; font-weight: bold; margin-bottom: 20px; } caption{ border-top-left-radius: 15px; border-top-right-radius: 15px; font-weight: bold; color: White; padding: 10px; background-color:#343857; } table{ border-spacing:5em width:800px; background-color:#292C44; } table th{ color: #FF610F ; } table td{ color: #F0F0F1; } #container{ display:block; width:800px; margin:0 auto; margin-top: -20px; } </style> </head> <body> <div id="container"> <?php function serverConnect($ip,$port){ $socket = @stream_socket_client("udp://$ip:$port", $errno, $errstr,0); if($socket){ if($response){ $name = $serwer[2]; $maxplayers = $serwer[9]; $pingame = $serwer[8]; $map = $serwer[3]; if($pingame >= 1){ echo '<b>'.$name.'['.$pingame.'/'.$maxplayers.']'.' Map: '.$map.'</b></br><span style="color: #787878;font-size: 15px;">IP:'.$ip.':'.$port.'</span>'; } } } } function getPlayers($ip, $port){ $socket = @stream_socket_client("udp://$ip:$port", $errno, $errstr,0); if($socket){ if($response){ $pingame = $serwer[8]; if($serwer[10] != null){ for($i=10; $i < $serwerCount; $i+=5){ $team = $serwer[$i+4]; if($team != null){ if($team == 1){ $serwer[$i+3], }else{ } }else; } } } if($pingame >= 1){ echo '<div id="table"> <div id="players" style="float:left;"> <table width="800px" align="left" cellpadding="5" cellspacing="0"> <caption align="top"><span style="margin-right: 380px">Players</span> Spectators</caption> <tr style="background-color:#434871;"> <th width="100px">Score</th> <th width="150px">Player</th> <th width="150px">Clan</th><th width="200px">Player</th> <th width="200px">Clan</th> </tr>'; if(($i % 2) == 1){ echo '<tr><td align="center" style="background-color:#343858;">'.$ingames[$i][1].'</td><td align="center" style="background-color:#343858;">'.$ingames[$i][0].'</td><td align="center" style="background-color:#343858;">'.$ingames[$i][2].'</td><td align="center" style="background-color:#404672;">'.$specs[$i][0].'</td> <td align="center" style="background-color:#404672;">'.$specs[$i][1].'</td></tr>'; }else{ echo '<tr><td align="center">'.$ingames[$i][1].'</td><td align="center">'.$ingames[$i][0].'</td><td align="center">'.$ingames[$i][2].'</td><td align="center" style="background-color:#515890;">'.$specs[$i][0].'</td> <td align="center" style="background-color:#515890;">'.$specs[$i][1].'</td></tr>'; } } echo ' </table> </div> '; // for($i = 0; $i <= count($specs); $i++){ // echo '<tr></tr>'; //} echo ' </div><div style="clear:both;maring-top: 40px;"></div></br></br>'; } } } function countPlayers(){ $socket = @stream_socket_client("udp://".$ip[$i][0].":".$ip[$i][1], $errno, $errstr, 0); if($socket){ if($response){ $pingame[] = $serwer[8]; } } } $ilosc = $ilosc + $pingame[$i]; } return $ilosc; } $count = (countPlayers() >= 1) ? "players" : "player"; echo "<div id=\"status\">Status: ".countPlayers()." ".$count."</br> <span style=\"float:right; font-size: 16px;color: white;\">Empty servers are not shown</span></div>"; serverConnect($ip[$i][0],$ip[$i][1]); getPlayers($ip[$i][0],$ip[$i][1]); } ?> </div> <body> </html>
Wiecie jak to rozwiązać? Ew. możliwe ze ja popełniłem jakiś błąd