Hello,
on my database i've decided to store IP of the visitors who answoers to polls. It's all working, but there is only 2 cases where not only 1 IP is stored, but there is 2 SAME ip for the same visitor
MySQL output (i replaced 2 numbers by XX)
10.188.XX.129, 10.188.XX.129
Here's the script to recieve the IP of the visitor :
<?php
function realip() {
if (isset($_SERVER)) {
if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) {
$realip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} elseif (isset($_SERVER["HTTP_CLIENT_IP"])) {
$realip = $_SERVER["HTTP_CLIENT_IP"];
} else {
$realip = $_SERVER["REMOTE_ADDR"];
}
} else {
if ( getenv( 'HTTP_X_FORWARDED_FOR' ) ) {
$realip = getenv( 'HTTP_X_FORWARDED_FOR' );
} elseif ( getenv( 'HTTP_CLIENT_IP' ) ) {
$realip = getenv( 'HTTP_CLIENT_IP' );
} else {
$realip = getenv( 'REMOTE_ADDR' );
}
}
return $realip;
}
?>
my question is : 99.9% of the time, only 1 IP is stored on MYSQL. I have 2 cases in mySQL database (example on my post) where 2 IP are stored on 1 row of mySQL : does it means that the visitors were using PROXY ? Thanks