🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

A high score server

Started by
1 comment, last by Goodlife 22 years, 10 months ago
Hi all, I was wondering if anyone had any tips on how to implement a CGI high score server that resides on a web server. Ideally, I would like to invoke the CGI using my APPLICATION, instead of opening a browser window. I don''t know how to do that. Also, I''d like to be able to receive the high scores, but this is not as crucial, as I can just post them on the web page. I''ve toyed with the idea of having a high score daemon server, which is something I do know how to do, but I was crushed when my ISP informed me: no daemons. So, does anyone know how to run a CGI c/c++ program from something other than a web browser? I understand the POST principles of CGI-- I wrote a whole web "page" before that was generated on the fly from C/C++ and sent back to the user-- but I''m not sure how I would invoke it from my program. Any help would be greatly appreciated.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
Advertisement
When you say your "application" are you referring to the game client running on the users system remotely across the Internet or LAN? If so there are a number of things you can do, but this is probably the easiest:

Implement a very simple http client into the game software that issues the get or post commands to port 80 of your web server and receive the formatted output from the CGI. It''s quite simple, and a lot of socket tutorials cover exactly how to do this. I work as an engineer on a commercial web browser, if you need more specific help (no source code, sorry) please contact me at fingh@hotmail.com.

Tim/Fingh


Have your game just shoot off a URL like this:

http://yourserver.com/score.asp?score=493483&playerID=2343

Mix in whatever encryption, cheat checking you require.

I won''t tell you the details, but we do this and the string looks like:

http://www.ourserver.com/score.asp?X=JJFDKJHS8342D723GDSAZ123241J

This topic is closed to new replies.

Advertisement