I have setup a polling system, where when you vote it stores your external IP using:
$_SERVER['REMOTE_ADDR'];
It stores this in a database called IPlist.
It also sets a cookie.
In the polling page if the cookie is set or the number of mysql_num_rows is greater than 1 it disables the radio boxes.
This is to prevent re-voting.
However some computers have the same external IPs. These can be hundreds at one time like at my school. If I vote on one computer nobody can vote at my school again.
Is there any way to get around this. For example to find the number of computers in the network then change mysql_num_rows. Or to find a unique Constant variable on every computer to store in a database.
Thanks.
There’s no way at all to know in advance how many devices are behind a given IP address… in fact, things are much worse than you think for AOL users (there can be tens of thousands of computers behind a given IP address (AOL Proxy).
If you’re not too worried about securing the result you can drop a cookie. Otherwise, as one of the commenter suggests, a login system is a good, standard approach.