Jacky444 Posted June 10, 2008 Share Posted June 10, 2008 Hello, My knowladge in php is somthing like medium we could say. At the moment, I need a php script that would be able to scan automaticly only 5 diffrent ip's with mixed game servers. I'm building up Servers status script. I finished so far every thing. But Now i'd needed a list of servers hosted. I was thinking, I could get ip's and ports first, (using fopen) then i would need to make script witch detect's a game name. well, here my mind breaks. I dont know how should i do this. my query script is simmilar to "phgstats". I hope you understood my bad english. Thanks in advance ! P.S.: Script is hosted on same server as all other gameservers. Link to comment https://forums.phpfreaks.com/topic/109489-gameservers-query/ Share on other sites More sharing options...
Jacky444 Posted June 11, 2008 Author Share Posted June 11, 2008 Hello, I'd like to Order game servers results by players on server at the moment, but i dont know how. Here is source: $d2 = mysql_query("SELECT id, game, serverip, serverport from hosted"); echo"<tr> <td valign='top'>Game:</td> <td valign='top'>Server Name:</td> <td valign='top'>Map name:</td> <td valign='top'>Players:</td> <td valign='top'>Ping</td> </tr>"; while(list($id, $game, $host, $port, $queryport) = mysql_fetch_array($d2) ) { $game = strtolower($game); $srv_rules = info($game, $host, $port, $queryport); echo"<tr onclick='location.href=\"http://193.138.204.45/index.php?query&id=".$id."\"' onmouseout=\"this.style.backgroundColor='';\"> <td valign='top' width='200'><a href='http://193.138.204.45/index.php?query&id=".$id."'>".$srv_rules["gamename"]."</a></td> <td valign='top' width='222'><a href='http://193.138.204.45/index.php?query&id=".$id."'>".$srv_rules["hostname"]."</a></td> <td valign='top' width='99'>".$srv_rules["mapname"]."</td> <td valign='top' width='75'>".$srv_rules["nowplayers"]."/".$srv_rules["maxplayers"]."</td>"; if( $srv_rules["response"] > 99 ) { echo"<td valign='top' height='20' width='56'><font color='red'>".$srv_rules["response"]."</font></td>"; } else { echo"<td valign='top' height='20' width='56'>".$srv_rules["response"]."</td>"; } echo"</tr>"; } srv_rules["response"] gives : ping of server srv_rules["mapname"] gives: name of map srv_rules["nowplayers"] gives = players playing at the moment ( iwana order this by players) srv_rules["maxplayers"] gives max players that are able to play can some one help me to order while by now players ? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/109489-gameservers-query/#findComment-563136 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.