Location: PHPKode > scripts > Advanced User Agent > example.php
require_once 'stnc_userAgent.php';//class
//echo $_SERVER [ "HTTP_USER_AGENT" ];
$detector =new detector($_SERVER [ "HTTP_USER_AGENT" ] );//new object creator		

echo '<font color="red">Browser Detector</font> <br>'; 
echo $detector-> browser ; 
echo '<br>';
echo $detector->basic_browser;
echo '<br>';
echo $detector->mobile_browser; 
echo '<br>';
echo $detector-> vip_bot;  
echo '<br>';
echo $detector->robot; 
echo '<br>';
echo $detector-> operating_system;
echo '<br>';
echo $detector-> browser_lang;
echo '<br>';

if ($detector->mobile_browser=="Apple iPhone")
echo 'Apple iPhone user<br>';
//header("Location: http://touch.facebook.com"); //example

echo '<font color="red">****ACTIONS************ </font> <br>'; 
 if ($detector->is_mobile)
 echo 'this is mobil browser --> '.$detector->mobile_browser.'<br>'; 
  if ($detector->is_browser)
   echo 'browser versiyon --> '.$detector-> browser.'<br>' ; 
  if ($detector->is_vip_bot)
   echo 'vip boot is --> '.$detector-> vip_bot.'<br>'; 
  if ($detector->is_robot)
   echo 'Boot is -->'.$detector->robot.'<br>';  

<a href="http://www.selmantunc.com/?file_id=102">Download Link</a><br>
<a href="http://selmantunc.com/project/browser_detection/"> ONLINE DEMO</a> <br>
Web site :<a href="http://www.selmantunc.com?ref=doc" target="_blank">www.selmantunc.com</a><br>
Mail :<a href="mailto:hide@address.com">hide@address.com</a><br>
Twitter:<a href="http://twitter.com/stunc" target="_blank">http://twitter.com/stunc  </a><br>
Friendfeed :<a href="http://friendfeed.com/stnc" target="_blank">http://friendfeed.com/stnc </a>  <br>    
Facebook: <a href="http://www.facebook.com/s.stnc" target="_blank">http://www.facebook.com/s.stnc</a><br>

-------------Mobil Browser Demonstration --Opera Mini----------------
<a href="http://www.opera.com/mobile/demo/"> http://www.opera.com/mobile/demo/</a> <br>

-------------Firefox Extension Demo----- iphone and other-----------
<a href="http://chrispederick.com/work/user-agent-switcher/"> User Agent Switcher</a> <br>
The User Agent Switcher extension adds a menu and a toolbar button to switch the user agent of the browser. 
It is designed for Firefox, Flock, Seamonkey  and Songbird, and will run on any platform that these browsers 
support including Windows, Mac OS  X and Linux. 
Return current item: Advanced User Agent