Normally when using TSocket objects you have to bind to a port. You can find the IP of a given gserver on
http://statistics.graal.us/ I guess, and then pick a port number in your script, but I do not think the TSocket functionality is final yet. It may be subject to change; in fact, it might not even be available for all users yet.
I am thinking that a standard HTTP request might be more suited to your purpose, though.