Get Ip Address, Computer Name, Browser Information Without Plugin
-
Get Ip Address, Computer Name, Browser Information Without Plugin
<?php
$ip = getenv(“REMOTE_ADDR”) ;
echo “Your IP Address Is : <b><u>$ip</u></b> “;
?></br>
[
<?php
GetHostByName($REMOTE_ADDR);
echo php_uname();
?>
]
</br>
[
<?php
function getip() {
if (isSet($_SERVER)) {
if (isSet($_SERVER[“HTTP_X_FORWARDED_FOR”])) {
$realip = $_SERVER[“HTTP_X_FORWARDED_FOR”];
} elseif (isSet($_SERVER[“HTTP_CLIENT_IP”])) {
$realip = $_SERVER[“HTTP_CLIENT_IP”];
} else {
$realip = $_SERVER[“REMOTE_ADDR”];
}
} else {
if ( getenv( ‘HTTP_X_FORWARDED_FOR’ ) ) {
$realip = getenv( ‘HTTP_X_FORWARDED_FOR’ );
} elseif ( getenv( ‘HTTP_CLIENT_IP’ ) ) {
$realip = getenv( ‘HTTP_CLIENT_IP’ );
} else {
$realip = getenv( ‘REMOTE_ADDR’ );
}
}
return $realip;
}//print out the ip and browser information
echo $_SERVER[“HTTP_USER_AGENT”]
?>
]
- The topic ‘Get Ip Address, Computer Name, Browser Information Without Plugin’ is closed to new replies.