PHP code to Get refferer website, visitor's IP and browser
Posted On at by milanThere are few very simple PHP predefined variable which give you the information about referer URL , visitors IP and visitors browser.
- Get Referer URL(The page from where user came to your site)
$referer = $_SERVER['HTTP_REFERER'];
?>
- Get visitor's IP
$visitorsIP= $_SERVER['REMOTE_ADDR'];
?>
- Get visitor's web Browser Name and version
$browser=$_SERVER['HTTP_USER_AGENT'];
?>