Web Hosting Talk







View Full Version : I have a script that's similar hot or not


eSited
10-17-2004, 11:41 AM
The question is when visitors visit the site they can easily vote someones pic, but next time when they return with same ip.. they are able to vote again, what is the code that prevents same ip from voting the same pic?

jasong
10-17-2004, 12:34 PM
there isnt a code for it, you have to make one so it works with your script :)

you can either keep all the pics the person voted on in a cookie,

OR you can have their ip in a database and have all the filenames they have voted on in a field on their row.

kneuf
10-17-2004, 12:35 PM
Log the ip and the pic, then when they get a new pic make sure that their ip is not already logged for the current pic. That is probably the wasiest way to do it.
[edit] oops someone beat me to it

jasong
10-17-2004, 12:45 PM
oops someone beat me to it
Muahahaha! :P

superprogram
10-17-2004, 01:13 PM
Having a registration system would be better..as there can be different persons on same PC at different time

phpdevrus
10-17-2004, 11:56 PM
registration system is best but the easiest way is to track it with cookies.

cheers and good luck

brk-guy
10-18-2004, 12:57 AM
you can just delete the cookies, and vote billions of times.

Zealus.com
10-19-2004, 12:53 PM
Originally posted by NTwebsiteHost
you can just delete the cookies, and vote billions of times.

Except for it would take you years to vote that many times... trust me, there are other things in life :)