Create voting form with small cheet factor
I have a voting form, and wish to use cookies for "security". I'm thinking, generate a string, set it as a coo
kie, and store it in a database. How would you create such a string?
Sjefen: md(uniqid());
md5(uniqid())
How long a string will that make?
do you need constant or unique string?
32 characters
Ah.
Good.
sha1 = 40, md5 = 32
hexadecimal
rza: I'm thinking a unique string.
Sjefen: php.net/md5 php.net/sha1 php.net/uniqid
why the hell would you want to use cookies for a vote/poll ? thats idiocy
clear cookies -> vote again
Netcrawle: Got a better idea?
is it behind some sort of member-system?
I'm very interested in a better solludtion
Nope.
Sjefen: save ip to database?
I've been doing that.
save ip, don't let that ip vote for 2 hours
But lots of IP's seem to change more often than I thought.
F.eks when I myself reset my adsl modem, it often changes ip
not within 2 hours
Sjefen: and you think people reset their dsl-modems to revote in your poll?
2 hours - and then you can go back and vote again? Not much help in that.
it limits the cheat-factor dramaticly
rza: As I said: "They seem to change more often than I thought was normal."
Netcrawle: It also makes it even easier to vote again than with cookies.
if i want to cheat at a poll i don't sit on my ass for 2 hours to vote again.. sort'a
Sjefen: checking ip sure as hell beats cookies ![]()
no it doesn't if you use them together
Netcrawle: It's a site where lots of the visitors will check in frequently
obliv: As I said, that's what I was thinking too. But my own ip, f.ex, has changed 4 times in 24 hours
Which is not exactly static
heh, telenor.. explains it :p
Sjefen: i'm not saying that it's perfect.. i'm just saying that it beats cookies ![]()
At least they got customer service - which is why i'm never using ngt again ![]()
obliv: Well, I agree on a technical side