How to get web browser information in PHP?

In order to get web browser information in php use the following code.

Without browscap.ini file

<?php
echo $_SERVER['HTTP_USER_AGENT'];
?>

With browscap.ini file

<?php
$browser = get_browser(null, true);
echo "<pre>";
print_r($browser);
echo "</pre>";
?>

Comments

Popular posts from this blog

About 12 Alwars

Post thumbnails from external URLs don’t appear in Blogger. How to resolve?