|
obtaining a list of servers |
Milan Mimica
Member #3,877
September 2003
|
What is the best way to store and retrieve a list of IP addresses of the servers that are running a game server? Say a can use HawkNL.
-- |
Kikaru
Member #7,616
August 2006
|
I am going to work on something that I suppose is like what you are doing. What I was going to do was use PHP with a database, and access it with cURL |
Onewing
Member #6,152
August 2005
|
One of my friends has had marginal success in creating OverServer. Maybe it can enlighten you on the subject matter, although he uses SDL. ------------ |
Carrus85
Member #2,633
August 2002
|
Coding an HTTP request shouldn't be too horrendously difficult; it is just a matter of sending a "GET" message to the proper server, with the proper filename specified. You automatically get a dump from the webserver that represents that data (that doesn't even have to be HTML; it can just be a text file). In short, you can simply do this (given that you have a socket open to the server). socket.write("GET /myServerList.txt HTTP/1.1\r\nHost: www.myurlhere.com\r\n\r\n") data = socket.read() for line in data: # parse Pretty simple stuff, really*
EDIT: It appears that you need to specify the carriage return in addition to the line feed character. Fixed.
|
Milan Mimica
Member #3,877
September 2003
|
The thing is, I've never used sockets directly before. I've always used high level libs. Seems a good thing to start with. OverServer, yeah looks good, but it's SDL.
-- |
BAF
Member #2,981
December 2002
|
I've been (not very actively) working on my IRC system for this. It does just what you want, a lobby to advertise game servers, chat, organize games, whatever you want, except instead of you needing a server, it uses IRC for all of its communication. |
Milan Mimica
Member #3,877
September 2003
|
Sounds interesting. Keep us informed.
-- |
|