Topic: [TOOL] TwRequest.php - a server status script
This PHP script can
load the server list from the master servers,
request the status of 0.5 and 0.6 servers and
even more.
But the best is that it works fast. Requesting the server list and the status of every server in this list takes around 5 seconds. (It can vary. With some fine tuning it is finish within 2 seconds on my virtual server.)
I've seen a some other PHP scripts doing the same, but usually the scripts take a minute or more to fetch the whole list, because they wait for a server's response before requesting the next. With 1000 servers where 60 of them time out in one second, such a script of course takes more than a minute. So I've taken a different approach and did it like the Teeworlds client: parallel requests.
My script also provides methods to request just the count of servers on a master server and the last version and list of default maps from the version server. Unfortunately the version server is offline, so i couldn't test the last two methods. Additionally my script contains a list of all countries that Teeworlds 0.6 supports (maybe even more, because I took the whole ISO 3166-1 list), with the short token and the full name.
For documentation and download, see this site: http://code.teele.eu/twrequest.