sending high score to a web page

Started by Andrechan, Sun 03/09/2006 21:07:11

Previous topic - Next topic

Andrechan

Hi!  :)
I would like to let people send their score on a web page (in php). Is it possible to send a Post  Http request to a page?

If it's not possible maybe I can do this way:
After the game over player enters his name and then the game generates an Url of the form
http://myurl/highscore.php?name=John&score=100&code=rrtrgfgd

with the code field a result of cripting the name and the score in some way (to avoid cheating). The php page will control if Cript(name,score)=code
But the problem is: what function can I use to cript?

rockeh

The only solution I can think of right now is outputting the URL to a file, sort of like this:
Code: ags

// figure out how to code the score
File *score = File.Open("score.html", eFileWrite);
score.WriteString ("<html><body><a href='http://yoursite/hiscore.php?name=John&score=100&code=blablabla'>Click here</a></body></html>");
score.Close();


Now, what this should do is create an HTML document that contains a link which will create a new user and high score -- always assuming your PHP does that :)

Also, please note that I haven't actually tried this, so it may not work...

Gilbert

There're similar questions asked in the past, like this and this.

Vince Twelve

I'm planning on implementing a simple system like this in my game (though I haven't gotten to that point yet and am not sure if it'll make the final game.)  But what I'm planning is simply to have the game supply a code and a webpage upon completion of the game.  For example:
QuoteCongratulations, you've won!  Go to http://www._____.com/____ and enter the following code to join the high score list: XKJERAL

It adds an extra step for the player, but you don't have to mess around writing plugins (which I have no idea how to do).

The more difficult part is coming up with a cryptographic scheme that can encode the player's score along with a sufficiently large random number (generated at the start of a new game so the player doesn't save just before finishing and then load repeatedly to add his name to the high score list many times), and have competent error checking included (so that a random guess or attempt at hacking the encoding scheme won't work).

strazer

#4
The FileNet plugin that was brought up here now has its own thread: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=28261

Please continue discussion about that plugin there.

SMF spam blocked by CleanTalk