Login   Register  
PHP Classes
elePHPant
Icontem

IE related Browser

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Browser Detection  >  All threads  >  IE related Browser  >  (Un) Subscribe thread alerts  
Subject:IE related Browser
Summary:additional function for other Browsers IE related.
Messages:1
Author:Karl Masche
Date:2008-04-03 14:13:49
 

  1. IE related Browser   Reply   Report abuse  
Picture of Karl Masche
Karl Masche
2008-04-03 14:13:49
I added a function for IE related Browsers as maxthon.

browser_detection.php

function get_addon($useragent)
{
$useragent = strtolower($useragent);
//check for most popular first
//maxthon
if(strpos("$useragent","maxthon") !== false)
{
return "Maxthon";
}
}


example.php

$addon = Browser_Detection::get_addon($_SERVER['HTTP_USER_AGENT']);

if($addon !== false)
{
echo "Your Addon is <b>$addon</b> <br />";
}

Other IE realted Browsers as Avant Browser could be added to the class.