RE: [PHP] voting script
| From: | Michael Richardson | Date: | Wed, 02 Aug 2000 17:05:55 +0000 |
| Subject: | RE: [PHP] voting script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9752@lists.php.net to get a copy of this message | ||
Well, dependant upon the need for accuracy, you could begin with the cookie
idea. Then, if the cookie is refused, you could require a login or use the
ip address as preference dicates.
Just a thought:
RW
-----Original Message-----
From: Matt McClanahan [mailto:cardinal@dodds.net]
Sent: Wednesday, August 02, 2000 9:39 AM
To: Apathy
Cc: php-general@lists.php.net
Subject: Re: [PHP] voting script
On Wed, 2 Aug 2000, Apathy wrote:
> Hi,
> I'm not sure if this has a PHP solution or not, I thought I'd bounce
it
> off the people of this group though...
>
> I have a site that gives users the ability to vote on sections of the
site.
> This is done by a php script that adds 1 to the "vote" field on a MySQL
> database.
>
> What I want to do is have a system that stops people from voting on each
> section more than once (i.e. cheating).
>
> I was going to do something that logged their ip for each section and
would
> stop multiple votes -- this would cause problems for people behind company
> firewalls though, and also cause *huge* logs. Then I thought maybe sending
a
> cookie when they voted that would notify the script if they tried to vote
> again -- this seems like the most feasible idea *I* have come up with so
> far, I was wondering whether anyone has had better solutions for a similar
> situation though?
And the third option is to require people to have an account on the
website, so you can just flip a toggle on the account's entry for if
they've answered the poll or not. However, this is no more foolproof than
setting a cookie on the browser (Which the browser can easilly reject)
In the end there's no assured way to prevent cheating. Requiring accounts
makes it the most hassle to cheat, afaik. Setting a cookie will work for
the majority of people, but it won't stop anybody who wants to cheat. All
they have to do is not accept the cookie.
Matt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net