Script Mengetahui IP siapa saja yang masuk ke Web kita

Kode scriptnya:
<?php
session_start();
if (empty($username))
{

$agent = $_SERVER['HTTP_USER_AGENT'];
$uri = $_SERVER['REQUEST_URI'];
$ip = $_SERVER['REMOTE_ADDR'];
$ref = $_SERVER['HTTP_REFERER'];
$ipasli = $_SERVER['HTTP_X_FORWARDED_FOR'];
$via = $_SERVER['HTTP_VIA'];
$dtime = date('r');
$message =
"
//--------------------------- //
Waktu: $dtime
IP asli: $ip
Browser: $agent
URL: $uri
Referrer: $ref
Proxy: $ipasli
Koneksi: $via
//--------------------------- //
";
mail("emailkamu@email.com","Yang Masuk Halaman Admin",$message);
session_destroy();
exit(); }
?>
 Jangan lupa save dengan nama "file.php"...