Geez, All the big time GSP's on the forums here and nobody has any idea how their bread and butter operates?
It's called rcon or "remote connect or connection". You only need to know what port the specific game communicates on or the rcon port. It's a pretty simple process to query a gameserver but building a GUI to interface with it is something else which might be better answered in the programmers forum.
Personally I would take a look at some of the different script sites for ideas or ready made scripts since this kind of thing can get complicated in a hurry.