PHP –– Detect User Stats
written by: admin
Date Written: 10/20/08
Last Updated: 3/27/10
IP address
<?PHP
$ipaddress = $_SERVER['REMOTE_ADDR'];
Echo "Your IP is $ipaddress!";
?>
This can be handy for gathering stats about your website or users. You can use it to find out how many unique users are visiting your site or what browser or screen resolution is most commonly used. See it in action
here.
referring website
<?php
$page_name = $_SERVER['HTTP_REFERER'];
echo $page_name;
?>
TAGS: php