html - Preventing from cheating -



html - Preventing from cheating -

i'm making facemash analog , found out it's easy cheat ^^ if type in browser several times: http://domain.com/rate.php?winner=1&loser=2, can create photo №1 winner. know it's possible prevent cookies , ip-blocking, don't know how exactly. please help me. thanks!

thant's illustration (not mine): http://facemash.moefelt.dk/

upd can provide source code if needed.

upd 1 rate.php http://jsfiddle.net/6xlr6/ index.php http://jsfiddle.net/avf4m/1/

you can utilize $_post instread of $_get, cheat harder !

cookies can saved in cache if user clean everytime, useless.

edit :

<form method=post action="rate.php"> <table> <tr> <td><img src="images/<?=$images[0]->filename?>" /></td> <td><img src="images/<?=$images[1]->filename?>" /></td> <input type="radio" name="winer" value="first"> first<br> <input type="radio" name="winer" value="second"> sec <input type="hidden" name="first" value="<?=$images[0]->image_id?>"> <input type="hidden" name="second" value="<?=$images[1]->image_id?>"> </tr> </table> </form>

in rate.php :

<?php $winerid = $_post['winer']; if ($_post['winer'] == $_post['first']){ $looser = $_post['second'];} else { $looser = $_post['second']; } ...

i think got want right ;-)

html cookies ip

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -