Securely passing variables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mhughes
Forum Newbie
Posts: 2
Joined: Fri Aug 13, 2004 11:51 am

Securely passing variables

Post by mhughes »

I need to pass some info from a Flash program to a PHP script and then to a database. How do i ensure that (for example) a user can't simply write "Program.php?score=1000" at the end of the path in the browser to cheat instead of going through the flash program?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

add a hash to it, where you combine a secret code with the data you're sending... use post to send it, if you can, with the url being you're url parameterized stuff..
mhughes
Forum Newbie
Posts: 2
Joined: Fri Aug 13, 2004 11:51 am

Post by mhughes »

... and if someone were to maliciously crack my flash program and discover the secret code? Is there a way to prevent this?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

not really that I know of.
Post Reply