Your IP

Posted: October 20, 2010 in Catetan Helpdesk

Source untuk menampilkan Your IP pada Webmu… saya batu copas dari tetangga🙂

function getRealIpAddr()

{
if (!empty($_SERVER[‘HTTP_CLIENT_IP’]))
//memeriksa IP lewat internet , hasil share
{
$ip=$_SERVER[‘HTTP_CLIENT_IP’];
}
elseif (!empty($_SERVER[‘HTTP_X_FORWARDED_FOR’]))
//memeriksa IP yang melewati proxy
{
$ip=$_SERVER[‘HTTP_X_FORWARDED_FOR’];
}
else
{
$ip=$_SERVER[‘REMOTE_ADDR’];
}
return $ip;
}
echo “Menggunakan $_SERVER[‘REMOTE_ADDR’] : ” . $_SERVER[‘REMOTE_ADDR’];
echo ”
“;
echo “Menggunakan fungsi : ” . getRealIpAddr();

echo ”

“;
echo “Anda menggunakan:
“;
echo ”


$id_browser = $_SERVER[“HTTP_USER_AGENT”];
echo $id_browser;

?>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s