online users log

rellFalkamany

New Member
I want to build a code (PHP) for detecting online user's ipI have installed Discuz forum. it shows the ips itself.what i want is something different. I want to built a code to see the ip of all online users in one page.how i can do that ?I wrote a code. see:\[code\]function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip;}\[/code\]usage:\[code\]$ipp=getRealIpAddr();echo "real ip=".$ipp;\[/code\]BUT I want to see the ip of whole online users in one page like a log.I tried to be clear this time.
 
Back
Top