Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Uploading high scores to a website

Author
Message
Ginger Monkey
20
Years of Service
User Offline
Joined: 2nd Nov 2004
Location:
Posted: 12th Jan 2005 23:56
I want to upload a players high score from my game to my website. I know I can launch a web page using the execute file command, but how would I pass data to that page? Can it be done in the command line attribute? Obviously I could put it straight into the url i.e. execute file "www.scorepage.php?scorevalue=156", "", "" but then anybody could cheat and just enter a score by entering this url into a browser. Any ideas?

Ginger Monkey - www.ginger-monkey.com
Clueless
20
Years of Service
User Offline
Joined: 16th Feb 2004
Location: Corbin, KY, USA
Posted: 13th Jan 2005 14:47
You might try a small web page with something like:

<FORM action="http://www.scorepage.com/cgi-bin/postscore.php">
<INPUT TYPE='HIDDEN' NAME='SCORE' VALUE=''><input type='submit'>
</FORM>

then include a short JavaScript routine that "clicks" the submit button.

You'd have to let your DB program stick the score in the right place in the VALUE='' keyword.

But actually you could build a little more safety into the thing if your program generated the entire quickie-html form in real time, saved it to the user's default Temp directory, and then do your EXECUTE statement.

A competent hacker would still be able to figure out what's going on, but with most people the HIDDEN attribute would prevent them from seeing how the score gets uploaded.

Another way, if you can find a copy of NETCAT for Windows, you could netcat the score to a particular IP address and port on your web server. Netcat just sends a data stream to the address/port you give it, and is a standard utility in the 'nix world. That way there's never a web page involved. I'm not up-to-speed on DBPro's NET SEND command set, but if it allowed you to specify a port and IP address, you could emulate netcat that way.

Just a few ideas, hope maybe one of them will help.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 15th Jan 2005 15:13
if you use name-value pairs, couldn't you have a "key" of some sort?
something like scorevalue = 156 key = whateverkeyyouwant?

if the key doesn't match, score doesn't go in?

you could easily check for the key on the server side..

Login to post a reply

Server time is: 2024-11-27 19:48:28
Your offset time is: 2024-11-27 19:48:28