Good point, about the proxy ... we run Squid at work, and you are corect
that REMOTE_ADDR will show up the proxy server's IP, but, at least with
Squid, a second environment variable will be setup in that case, called
'HTTP_X_FORWARDED_FOR', that contains the true IP of the visitor ...
A simple:
if(HTTP_X_FORWARDED_FOR) {
use this IP
} else {
use REMOTE_ADDR
}
would work around that limitation/problem ...
On Mon, 4 Dec 2000, mycgiserver wrote:
> Hi,
>
> we're storing the voter's IP which gives us at least a vague hint on whether
> a group of votes was casted by a single or multiple visitors.
>
> As for limiting the voting to one per IP, this would be a bad idea as two
> actually different visitors wouldn't be able to vote (one of them at least)
> in the case they're using the same proxy for example although they would
> have the right to as they haven't yet voted.
>
> Thanks for the idea though!
>
> cheers,
>
> mycgiserver team
>
> -----Original Message-----
> From: The Hermit Hacker <scrappy@hub.org>
> To: mycgiserver <general@mycgiserver.com>
> Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
> Date: 4. Dez 2000 14:05
> Subject: Re: Your RDBMS Survey ...
>
>
> >On Mon, 4 Dec 2000, mycgiserver wrote:
> >
> >> Hi,
> >>
> >> well, actually we noticed that some person voted hundreds of times for
> ONE
> >> item (which has to be the PostgreSQL one). That was a single person
> though,
> >> not multiple individuals.
> >
> >Just curious, but how did you determine this? As there is no login
> >information required to complete the survey ... if based off of IP, why
> >not setup a database for logging the votes, including the IP of the person
> >making the vote. Using something like PHP, you could easily save:
> >
> >REMOTE_ADDR <database>
> >
> >and if REMOTE_ADDR already exists, don't add another record for it ... so
> >that now you've restricted voting to be one per IP ...
>
>
Marc G. Fournier ICQ#7615664 IRC Nick: Scrappy
Systems Administrator @ hub.org
primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org