Your Ad Here

Saturday, November 7, 2009

How we know browser properties using php

get_browser() attempts to determine the capabilities of the user's browser. This is done by looking up the browser's information in the browscap.ini file.

echo $_SERVER['HTTP_USER_AGENT'];
$browser = get_browser();

foreach ($browser as $name => $value) {
echo "$name $value
\n";
}

No comments:

Post a Comment

Your Ad Here