Tracking an user
Tracking an user is very easy in php. It requires a single line to get the client ip address.
The line is $ip=$_SERVER['REMOTE_ADDR'];
Easy. Isn’t it?
Just put the following code in a php file and upload to your domain.
<?php
echo $_SERVER['REMOTE_ADDR'];
?>
Then open the page using your browser. It will print your ip address. Check it.
If you do this to your localhost (not in the server), it will print the virtual server ip address that is 127.0.0.1 which is default for all localhost (not in the server but may be built up in desktop)
Tags:remote_addr, track, track ip, tracking user in php
