That's "just" something you "just" need to knowrav wrote:just remove any die() statements and/or replace them with print()?


Moderator: OpenTTD Developers
Bilbo wrote:Just wonder .. will there be querying the master server for server list supported in some future versions, or should I do this myself?
Code: Select all
<?
$serverpage = file_get_contents('http://www.openttd.org/servers.php');
$serverpage = explode('<table cellspacing="0" cellpadding="4" border="0" class="fullwidth">', $serverpage);
$serverpage = explode('</table>', $serverpage[1]);
$serverpage = $serverpage[0];
print '<table cellspacing="0" cellpadding="4" border="0" class="fullwidth">'. $serverpage .'</table>';
?>
Refresh page and my avatar colors will change!Kanibal wrote:![]()
Why is illegal stuff always fun
![]()
I thought of that too. But then I realized one small glitch. The list contain only server addresses and no ports (and ports often differ). And fetching one page from the server for each server just to get port ... that would be silly and waste of server resources, bandwidth, etc ...t2t2 wrote:...Bilbo wrote:Just wonder .. will there be querying the master server for server list supported in some future versions, or should I do this myself?
1. Gets HTML code of http://www.openttd.org/servers.php
2. Narrows it down to table of servers
3. Prints output with table starting tags.
Well, there are reason, like:dihedral wrote:afaik the master server could be queried with udp packets, fetching a list of ip's and port numbers for games, though i dont think there should ever be a reason anybody needs to fetch data from servers that are not their own
Code: Select all
change $info $detail and $newgrf are now handled as objects
can be retreived as arrays if need be (see documentation)
added caching, currently only newgrf data is cached, minimizing the
amount of newgrf requests sent to the server
added support for fetching newgrf data, packet types:
UDP_CLIENT_GET_NEWGRFS and UDP_SERVER_NEWGRFS
fixed conversion of vehicle and station types was brocken
Users browsing this forum: No registered users and 10 guests