View Single Post
  #2  
Old 03-19-2012, 12:48 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
You can use TSocket to listen on a port and then talk to that port from your webserver. If you're using PHP or some language that doesn't make it real easy to work with raw sockets, you might want to consider using Grattpd to wrap your communication in HTML (just like any regular API).

Normally you have to request access to bind to a specific port from Stefan, but you can also bind to port 0, which will randomly choose a port to bind to. Once you do this, call a script on your webserver with the port and have the webserver save the IP and port so that it can contact the gserver when necessary. Look at Grattpd for how I did this.
__________________
Reply With Quote