Firstly, there are several ways to capture the IP address of a client using PHP. Here are 3 methods that I know of:
if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ipAddress = $_SERVER['HTTP_X_FORWARDED_FOR']; } else if (isset($_SERVER['HTTP_CLIENT_IP'])) { $ipAddress = $_SERVER['HTTP_CLIENT_IP']; } else if (isset($_SERVER['REMOTE_ADDR'])) { $ipAddress = $_SERVER['REMOTE_ADDR']; }
Secondly, if you are concerned about volatile storage, such as cookies or sessions, it is best to have a database table that stores these values. It can be a simple table with three columns: client_ip, item_id and date_created. This will allow you to track whether a specific IP address has been used to vote on a specific item.
Now the only problem that I see is that the client is working and sitting at the proxy server. So, I think you have several options, each of which has its pros and cons.
source share