Get Your Visitor IP ADDRESS!

Here is a simple script to get your visitor IP Address :
<?php
if ($_SERVER["HTTP_X_FORWARDED_FOR"]) {
$httpvia = "".$_SERVER["HTTP_VIA"]."";
$pisah = explode("", $httpvia);
$muncul = "$pisah[1]";
echo "$muncul <br> ".$_SERVER['REMOTE_ADDR']." <br> ".$_SERVER["HTTP_X_FORWARDED_FOR"]."";
}
else {
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo "".$_SERVER['REMOTE_ADDR']." <br> ($hostname)";
}
?>

Enjoy :)
Previous
Next Post »