Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dragan Dinic  >  Browser Detection  >  example.php  >  Download  
File: example.php
Role: Unit test script
Content type: text/plain
Description: Example of usage
Class: Browser Detection
Determine the browser and OS from the user agent
Author: By
Last change:
Date: 2005-10-30 07:33
Size: 306 bytes
 

Contents

Class file image Download
<?php

require_once("browser_detection.php");

$browser Browser_Detection::get_browser($_SERVER['HTTP_USER_AGENT']);
if(
$browser !== false)
{
    echo 
"Your browser is $browser <br />";
}

$os Browser_Detection::get_os($_SERVER['HTTP_USER_AGENT']);

if(
$os !== false)
{
    echo 
"Your OS is $os <br />";
}
?>