Source for file libdetectuseragent.php
Documentation is available at libdetectuseragent.php
* User Agent detection class
* @author Christopher Troup <mini@chatetheory.com>
* User Agent identification string
* @todo What does this do?
* @todo What does this do?
* All the information about the browser that could be detected
* @param string $useragent User Agent indentification string
define('PHPUSERTRACK_BROWSCAP', dirname(__FILE__ ) . '/../include/browscap.ini');
if ($useragent == null) {
$useragent = $_SERVER['HTTP_USER_AGENT'];
//if (!$array = $this->get_browser_php()) { // try native php function first
//$array = $this->get_browser_local(PHPUSERTRACK_BROWSCAP);
* Return the detected information
* Attempt to use PHPs built in get_browser() function
* @return array detected information
* Drop-in replacement for get_browser()
* @return array detected information
array('\\','.','?','*','^','$','[',']','|','(',')','+','{','}','%'),
array('\\\\','\\.','.','.*','\\^','\\$','\\[','\\]','\\|','\\(','\\)','\\+','\\{','\\}','\\%'), $key). '$';
$cap= array('browser_name_regex'=> strtolower($keyEreg),'browser_name_pattern'=> $key)+ $value;
|