...

View Full Version : [closed] Get Users Browser Details



markman641
08-09-2012, 05:55 AM
Hello, my friend told me that you can get a users Browser Details, but I can't seem to find a script anywhere.

I would like to have it tell me what browser they are using, their ISP, their browser plugins, their city/state.

Please let me know, thanks.



LOL I FOUND IT! $_SERVER['HTTP_USER_AGENT'] Thanks anyway!

minkoko
08-09-2012, 12:11 PM
<?php
$server = $_SERVER['HTTP_USER_AGENT'] ;
echo $server;
echo "<br/>";


//echo "<br/>";
echo "<script type = \"text/javascript\">document.write(navigator.userAgent);</script>";
?>
or

<?php

$ip = $_SERVER['REMOTE_ADDR'];
$referer = $_SERVER['HTTP_REFERER'];
$date = date('r');
$status = "Your IP is <i>$ip</i> <br />\n";

function agent($browser) {
$useragent = $_SERVER['HTTP_USER_AGENT'];
return strstr($useragent, $browser);
}

function os($opersys) {
$oper = $_SERVER['HTTP_USER_AGENT'];
return strstr($oper, $opersys);
}

if(agent('Firefox') != FALSE) {
$status .= "You are using <i>Firefox browser</i> <br />\n";

if(os('Windows') != FALSE) {
$status .= "You are on <i>Windows</i> <br />\n";
}
elseif(os('Linux') != FALSE) {
$status .= "You are on <i>Linux</i> <br />\n";
}
elseif(os('MAC') != FALSE) {
$status .= "You are on <i>MAC OSX</i> <br />\n";
}
else {
$status .= "Operating system not recognised <br />\n";
}

}

else if(agent('America Online Browser') != FALSE) {
$status .= "You are using <i>AOL browser</i> <br />\n";
$staus .= "You are on <i>Windows</i> <br />\n";
}

else if(agent('Opera') != FALSE) {
$status .= "You are using <i>Opera browser</i> <br />\n";

if(os('Windows') != FALSE) {
$status .= "You are on <i>Windows</i> <br />\n";
}
elseif(os('Linux') != FALSE) {
$status .= "You are on <i>Linux</i> <br />\n";
}
elseif(os('MAC') != FALSE) {
$status .= "You are on <i>MAC OSX</i> <br />\n";
}
else {
$status .= "Operating system not recognised <br />\n";
}

}

else if(agent('Safari') != FALSE) {
$status .= "You are using <i>Safari browser</i> <br />\n";
$status .= "You are on <i>Linux</i> <br />\n";
}

else if(agent('MSIE') != FALSE) {
$status .= "You are using <i>Internet Explorer</i> <br />\n";
$status .= "You are on <i>Windows</i> <br />\n";
}

else {
$status .= "User Agent not recognised. <br />\n";

if(os('Windows') != FALSE) {
$status .= "You are on <i>Windows</i> <br />\n";
}
elseif(os('Linux') != FALSE) {
$status .= "You are on <i>Linux</i> <br />\n";
}
elseif(os('MAC') != FALSE) {
$status .= "You are on <i>MAC OSX</i> <br />\n";
}
else {
$status .= "Operating system not recognised <br />\n";
}

}

if(!empty($referer)) {
preg_match('/http:\/\/(.+)(.com\/|.net\/|.org\/|.co.uk\/|.info\/)/', $referer, $referersite);
$status .= "You found this page from <i>$referersite[0]</i> <br />\n";
}

$status .= "Date data logged <i>$date</i>";

print $status;

?>
i don't konw other method friend ,
Thanks

DrDOS
08-09-2012, 04:10 PM
Much better than stuppy javascript methods.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum