Getting the status of a server with PHP?

Is there a way to get the server info with PHP? For example, number of players, how long the server has been up, etc.

I don’t know much about how web servers and stuff works but I guess you could just use http.Post (http://wiki.garrysmod.com/page/http/Post) to a URL? Count the amount of players and post it? Just make functions for everything you need in game and post it to a URL.

Thanks for the idea, but I’ll use SourceQuery instead.