Return to Snippet

Revision: 39931
at January 23, 2011 02:19 by i0ni


Initial Code
function browser(){
  $keyname_ua_arr = array('HTTP_X_DEVICE_USER_AGENT', 'HTTP_USER_AGENT');
  foreach ($keyname_ua_arr as $keyname_ua) {
  if (!emptyempty($_SERVER[$keyname_ua])){
  $ua = $_SERVER[$keyname_ua];
  break;
  }
  }
  return $ua;
}

Initial URL

                                

Initial Description

                                

Initial Title
Detect user agent

Initial Tags
browser, user

Initial Language
PHP