Ping
I know this is kind of down the line but anyways.
What language would I need to use to ping a game server off of a website and how would I do that?
Do you directly ping the IP followed by the port to see if the game is active or how would you do it? Thanks
This is a very vague question. Are you saying you need to write an app that''s going to sit on a webserver to check to see if a game is available or is it that you need to connect to a website to see if a game is available? Regardless you can''t "ping" a port. You can, however just telnet to the port: telnet [ip or host name] [port#].
In code that''s pretty easy to do in whatever language you''ll need to do it in, just use sockets to connect to that IP and port... Reply with a more clear question if I didn''t answer yours correctly.
In code that''s pretty easy to do in whatever language you''ll need to do it in, just use sockets to connect to that IP and port... Reply with a more clear question if I didn''t answer yours correctly.
I want to be able to ping a dedicated game sever using something simple. Here is my reason. The game I play exports an html document with stats at the end of the game, I am trying to bring those stats into a database and keep a running score, well I cant figure out how to make it import those stats, so in the mean time I am writing the end results and what I want is to be able to tell if a game is running via a a website, pinging the server seems the only way. Sorry I didnt explian better
Pinging the game server will only tell you if the host is reachable, not if the game server application is running. You would have to maintain a connection with the game server. For this you would have to know the port that the server listens on (and also if there is more than one), as well as some of its protocol (like if it disconnects clients for inactivity).
What sort of game is this? Website?
MatrixCubed
http://MatrixCubed.cjb.net
[edited by - MatrixCubed on October 8, 2002 10:15:25 AM]
What sort of game is this? Website?
MatrixCubed
http://MatrixCubed.cjb.net
[edited by - MatrixCubed on October 8, 2002 10:15:25 AM]
[ Odyssey Project ]
Seems to me if the HTML document you are bringing down only gets updated after a game is complete, just data mine that page as frequent as you want looking for changes (maybe store a checksum in your database and then compare the checksums). If it''s a new page, you bring the page down and parse out the formatting so you get the actual data you want and then store it and the new checksum and maybe a last update time/date. But if the HTML page is a page that is generated post-game you''ll almost need to build some sort of client that will communicate on the ports you listed with the server. And in my experience most game servers will reject anything that doesn''t identify itself to be a true client (players in the game). Maybe I''m still not understanding...
I should maybe ask this question, I believe it would help me out greater, how do games like half life and Q3 get there stats posted as the game is going on? Is it something that is exported or created in a Temp directory?
The game itself has to keep these scores somewhere before it posts them, how could I determine where it keeps these?
The game itself has to keep these scores somewhere before it posts them, how could I determine where it keeps these?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement