Archived

This topic is now archived and is closed to further replies.

Server-Side (Web) Scripting for Remotely Hosted Server

This topic is 5309 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After writting two independent client/server applications that use DirectPlay8 as a back-bone, I want my web-page to give updated server statistics, such as "Server: Online", "Player''s Online: 7", such as a phpBB forum would show how many members were online. So far, I''ve yet to find anyone who could tell me how to do this, though I could easily do it with DHTML or ASP if the web-site was hosted from the same machine that the Server is, but I''d rather use CGI/javascript/HTML for this. Any help would be appreciated.

Share this post


Link to post
Share on other sites
I''m not sure I understand what you mean... the technologies that you said you''d prefer to use can''t really be used to transfer values between machines in this way. Sure, you could just write an HTML file to a directory on the target machine and change it sometimes, but that isn''t exactly using HTML to transfer server statistics.

One possible way to do it could be to create a web service (using for instance ASP.NET) that runs on the game server machine, and have the web server query this service for the values.

Share this post


Link to post
Share on other sites
If I get you right, you want to use HTTP to get stats instead of sending them with custom socket? Or do you want to have a web page people can log into and see how many players are online?

If you do the former, you can set up an XML CGI to spit out the data. Then people could write their own tools to read it. Or you could read it yourself.

If the latter, you can just write a simple CGI in your language of choice. I like Perl, Python (now they have mod_python for Apache) or go with the Windows techs mentioned before (ASP, or web services). Just have it output the info in a simple, small format, then just give people an example how to include it in a frame or table in HTML.

Interim

Share this post


Link to post
Share on other sites
Have you looked into the IDirectPlay8LobbyClient and IDirectPlay8LobbyServer API ? They were designed so that the game host can exchange information with a remote game lobby server (a la GameSpy or MSN Zone). Here''s an extirp of the LobbyServer docs:

==========
To manage multiplayer games, a lobby server
typically handles a variety of tasks, including:

o Managing the network addresses of the various
game sessions and players. {i.e. list all the running servers, their ping and the players'' score & setup (allies/weapons/health...)}

o Launching a session by launching the associated
game applications on the players'' computers.

o Adding players to an ongoing session.

o Connecting the various computers in a session to
the correct network addresses.

o Keeping track of changes in the session, such as players leaving the game or changes in the game''s host.

================


-cb



Share this post


Link to post
Share on other sites