You could do this without writing your own socket program. You could let the game server open a "test server" before the real game server is started. Then this server sends a http_post() for calling a php script on the php/mysql server. This script starts a client.exe that tries to connect with the "test server" (so you should send the port of the game server to the script; you can get the ip address through a php instruction). If the connection is successful, the client.exe calls a php script on the localhost (because the php server and the client.exe run on the same machine) and this script adds the server to the list. If the connection event is called on your game server it knows that the client could successfully connect. => the "test server" is closed and the real server is started.

Shouldn't be to hard to implement with ANet. Just a few lines of code wink Also the php part is easy.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version