php - Voting System (Multiple sites), solution for a toplist that has no callback -


hello everyone

i have vote system, , ill explain how work.

there websites called toplists contains top 100 items in (depending on vote count).

okay i've made voting system, have 5 different buttons, linking different toplists.

some toplists have callback (a callback), , doesn't.

i want trick client, make sure vote, know impossible 100% guarantee, possible trick client cheating.

my idea:

when user clicks on 1 of links, have wait 8 seconds before clicking 'submit' button, voting points.

first result in head: javascript.

and that's how planning this: (just example, not actual code!)

#buttonid.click (function() { var time = **current_time + 8 seconds** });  #submit.click(function() { if (current_time < time) { return error 1 } else { process... }); 

this little example of how thought of doing this, variable time = current time when clicked on button, + 8 seconds.

so when clicks submit, checks if current time less variable time seconds. if yes, return error message.

but not sure how so. way of doing this?

basically question:

how can trick client? other ways?.

how can javascript seconds + time trick?

i use settimeout:

#buttonid.click (function() {     settimeout(function () {         /* enable submit button */     }, 8000); }); 

but keep in mind doing client-side isn't secure, trivial bypass.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -