[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Simple solution to voting problem?
On Mon, 24 May 1999, Micah Yoder wrote:
> Robert Myers wrote:
> >
> I don't think we should permanently store every vote and IP. Only have
> a way to check for obvious dups, like if someone clicks 'yes' twice or
> more, or runs a script like the one I posted.
>
I has suggested a temp table, that could be nuked as well.
> If we only allowed one vote per IP per article, it would be unfair to a
> lot of people, like people behind firewalls or large IP masq sites. And
> people with dynamic IPs could easily vote more than once if they wanted
> to (and there's NO way to fix that in any case).
>
The whole problem I see is this. Joey, the lameass guy from joe
blow high school figures our our voting system, maybe it takes him a few
months maybe it does not. He runs a script, it bounces our numbers up for
what we are counting. This is bad.
I say let's track the IP's for a short time until something else
can come of it, I did take a quick look at the /. code. I am no perl
master but this is what I found:
if($aid>-1) {
my $cursor = $dbh->prepare("
SELECT id from pollvoters where
qid='$qid' AND
id='$ENV{REMOTE_ADDR}'");
$cursor->execute;
# print $ENV{REMOTE_ADDR};
if ($cursor->fetchrow()) {
$notes="You have already voted.";
} else {
$notes="Your vote has been registered.";
$dbh->do("
INSERT into pollvoters
(qid,id,time)
VALUES('$qid','$ENV{REMOTE_ADDR}',
now())");
What do you make of that? qid and aid are for tracking the question.
-Bob
ccrider@whiterose.net
Systems Administrator for whiterose.net
http://www.whiterose.net