FUNCTION LOGGING () {
global $REMOTE_ADDR, $HTTP_USER_AGENT;
$today = getdate(mktime(date("H")+7));
$DAY = $today['mday'];
$MONTH = $today['month'];
$year = $today['year'];
$HOUR = $today['hours'];
$IP = $REMOTE_ADDR;
$BROWSER = $HTTP_USER_AGENT;
$SCREEN = $this->SCREEN;
MYSQL_QUERY ("INSERT INTO log (Day, Month, Year, Hour, Browser, IP, Screen) VALUES ('$DAY', '$MONTH', '$year', '$HOUR', '$BROWSER', '$IP', '$SCREEN')");
}
everything work fine except the IP.
The IP stored in DB is 127.0.0.1. How to fix it?