Real User Agent (Ultimate)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • script Real User Agent (Ultimate)

    PHP Code:
     function ua()
     {
      
    $agent = ( isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : null ) ;
      if ( 
    preg_match"|Puffin/(\d{1,2}\.\d)|i"$agent$match ) ) {
       return 
    $match[0] ; // Puffin Browser mobile & desktop (Puffin)
      
    } else
       if ( 
    preg_match"|UCWEB/(\d{1,2}\.\d)|i"$agent$match ) && preg_match"|UCBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
        return 
    "UC Mini/" $match[1] ; // UC Mini Browser (Alibaba)
       
    } else
        if ( 
    preg_match"|UCTurbo/(\d{1,2}\.\d)|i"$agent$match ) ) {
         return 
    "UC Turbo/" $match[1] ; // UC Turbo Browser (Alibaba)
        
    } else
         if ( 
    preg_match"|UCBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
          return 
    "UC Browser/" $match[1] ; // UC Browser mobile (Alibaba)
         
    } else
          if ( 
    preg_match"|Quark/(\d{1,2}\.\d)|i"$agent$match ) ) {
           return 
    $match[0] ; // Quark Browser (Alibaba)
          
    } else
           if ( 
    preg_match"|AlohaLite/(\d{1,2}\.\d)|i"$agent$match ) ) {
            return 
    str_ireplace"AlohaLite/""Aloha Lite/"$match[0] ) ; // Aloha Lite Browser (Aloha)
           
    } else
            if ( 
    preg_match"|AlohaBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
             return 
    str_ireplace"AlohaBrowser/""Aloha/"$match[0] ) ; // Aloha Browser (Aloha)
            
    } else
             if ( 
    preg_match"|EdgA/(\d{1,2}\.\d)|i"$agent$match ) ) {
              return 
    str_ireplace"EdgA/""Edge/"$match[0] ) ; // Edge Browser mobile (Microsoft)
             
    } else
              if ( 
    preg_match"|ManagedBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
               return 
    str_ireplace"ManagedBrowser/""Intune Managed/"$match[0] ) ; // Intune Managed Browser (Microsoft)
              
    } else
               if ( 
    preg_match"|Mint Browser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                return 
    str_ireplace"Mint Browser/""Mint/"$match[0] ) ; // Mint Browser (Xiaomi)
               
    } else
                if ( 
    preg_match"|MiuiBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                 return 
    str_ireplace"MiuiBrowser/""Miui/"$match[0] ) ; // Miui Browswer (Xiaomi)
                
    } else
                 if ( 
    preg_match"|YaBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                  return 
    "Yandex/" $match[1] ; // Yandex Browser mobile & desktop (Yandex)
                 
    } else
                  if ( 
    preg_match"|coc_coc_browser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                   return 
    str_ireplace"coc_coc_browser/""Coc Coc/"$match[0] ) ; // Coc Coc Browser mobile & desktop (CocCoc)
                  
    } else
                   if ( 
    preg_match"|MQQBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                    return 
    str_ireplace"MQQBrowser/""QQ/"$match[0] ) ; // QQ Browser mobile (Tencent)
                   
    } else
                    if ( 
    preg_match"|Bang/(\d{1,2}\.\d)|i"$agent$match ) ) {
                     return 
    $match[0] ; // Bang Browser (Tencent)
                    
    } else
                     if ( 
    preg_match"|MxBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                      return 
    str_ireplace"MxBrowser/""Maxthon/"$match[0] ) ; // Maxthon Browser mobile (Maxthon)
                     
    } else
                      if ( 
    preg_match"|Maxthon/(\d{1,2}\.\d)|i"$agent$match ) ) {
                       return 
    $match[0] ; // Maxthon Browser mobile & desktop (Maxthon)
                      
    } else
                       if ( 
    preg_match"|MonumentBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                        return 
    str_ireplace"MonumentBrowser/""Monument/"$match[0] ) ; // Monument Browser (Monument)
                       
    } else
                        if ( 
    preg_match"|ACHEETAHI/(\d{1,2})|i"$agent$match ) ) {
                         return 
    str_ireplace"ACHEETAHI/""Cheetah/"$match[0] ) ; // Cm Browser (Cheetah)
                        
    } else
                         if ( 
    preg_match"|SamsungBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                          return 
    str_ireplace"SamsungBrowser/""Samsung Internet/"$match[0] ) ; // Internet Browser (Samsung)
                         
    } else
                          if ( 
    preg_match"|Focus/(\d{1,2}\.\d)|i"$agent$match ) ) {
                           return 
    str_replace"Focus/""Firefox Focus/"$match[0] ) ; // Firefox Focus Browser (Mozilla)
                          
    } else
                           if ( 
    preg_match"|Rocket/(\d{1,2}\.\d)|i"$agent$match ) ) {
                            return 
    str_replace"Rocket/""Firefox Rocket/"$match[0] ) ; // Firefox Rocket Lite Browser (Mozilla)
                           
    } else
                            if ( 
    preg_match"|Opera Mini(/)?([0-9\.]{1,4})|i"$agent$match ) ) {
                             return 
    $match[0] ; // Opera Mini Browser (Opera)
                            
    } else
                             if ( 
    preg_match"|OPR/(\d{1,2}\.\d)|i"$agent$match ) ) {
                              if ( 
    $match[1] <= 49 ) {
                               return 
    "Opera Mini/" $match[1] ; // Opera Mini Browser (Opera)
                              
    }
                              if ( 
    $match[1] >= 50 ) {
                               return 
    "Opera/" $match[1] ; // Opera Browser mobile & desktop (Opera)
                              
    }
                             } else
                              if ( 
    preg_match"|OPT/(\d{1,2}\.\d)|i"$agent$match ) ) {
                               return 
    str_ireplace"OPT/""Opera Touch/"$match[0] ) ; // Opera Touch (Opera)
                              
    } else
                               if ( 
    preg_match"|Opera Mobi/([a-z0-9\-]{1,5})|i"$agent$match ) && preg_match"|Version/(\d{1,2}\.\d)|"$agent$match ) ) {
                                return 
    str_ireplace"Version/""Opera Mobile/"$match[0] ) ; // Opera Browser symbian (Opera)
                               
    } else
                                if ( 
    preg_match"|Opera Mobi/([a-z0-9]{1,3})|i"$agent$match ) ) {
                                 return 
    "Opera Mobile" // Opera Browser symbian (Opera)
                                
    } else
                                 if ( 
    preg_match'|NK([^\s\;\-\_\/\(\)]*)|i'$agent$match ) ) {
                                  return 
    $match[0] ;
                                 } else
                                  if ( 
    preg_match'|Nokia-([^\s\;\_\/\(\)\.]*)|i'$agent$match ) ) {
                                   return 
    $match[0] ;
                                  } else
                                   if ( 
    preg_match'|Nokia(\/)?([^\;\-\_\/\(\)\.]*)|i'$agent$match ) ) {
                                    return 
    $match[0] ;
                                   } else
                                    if ( 
    preg_match'|Nokia(\s)?([^\s\;\-\_\/\(\)\.]*)|i'$agent$match ) ) {
                                     return 
    $match[0] ;
                                    } else
                                     if ( 
    preg_match"|iLunascape/(\d{1,2}\.\d)|i"$agent$match ) && preg_match"|Build/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                      return 
    "iLunascape " $match[1] ; // iLunascape Android
                                     
    } else
                                      if ( 
    preg_match'|Aspen Simulator([^\;]*)|i'$agent$match ) && preg_match"|Aspen (\d{1})|"$agent$match ) ) {
                                       return 
    "Aspen Simulator " $match[1] ;
                                      } else
                                       if ( 
    preg_match'|iPhone Simulator([^\;]*)|i'$agent$match ) && preg_match"|iPhone OS (\d{1})|"$agent$match ) ) {
                                        return 
    "iPhone Simulator " $match[1] ;
                                       } else
                                        if ( 
    preg_match'|iPod([^\;]*)|i'$agent$match ) && preg_match"|iPhone OS (\d{1})|"$agent$match ) ) {
                                         return 
    "iPod " $match[1] ;
                                        } else
                                         if ( 
    preg_match'|iPad([^\;]*)|i'$agent$match ) && preg_match"|CPU OS (\d{1})|"$agent$match ) ) {
                                          return 
    "iPad " $match[1] ;
                                         } else
                                          if ( 
    preg_match"|iPhone OS ([^\_\/]*)|i"$agent$match ) or preg_match"|CPU OS (\d{1})|"$agent$match ) ) {
                                           return 
    "iPhone " $match[1] ;
                                          } else
                                           if ( 
    preg_match'|BlackBerry(\s)?([^\;\/]+)|i'$agent$match ) ) {
                                            return 
    $match[0] ;
                                           } else
                                            if ( 
    preg_match'|SonyEricsson(\s)?([^\s\_\/]*)|i'$agent$match ) ) {
                                             return 
    $match[0] ;
                                            } else
                                             if ( 
    preg_match'|Ericsson([^\/\(\)]+)|i'$agent$match ) ) {
                                              return 
    $match[0] ;
                                             } else
                                              if ( 
    preg_match'|Galaxy Nexus|i'$agent$match ) ) {
                                               return 
    $match[0] ; // Galaxy Nexus Phone
                                              
    } else
                                               if ( 
    preg_match"|Nexus\s?(\w+)?(\d{1,2}\w+)?(\d{1,2})|i"$agent$match ) ) {
                                                return 
    str_ireplace"_"" "$match[0] ) ; // All Nexus Phones
                                               
    } else
                                                if ( 
    preg_match'|SoftBank/1.0/([^\s\/]+)|i'$agent$match ) ) {
                                                 return 
    "SoftBank/" $match[1] ;
                                                } else
                                                 if ( 
    preg_match'|SAMSUNG(\s)?([^\s\;\_\/]+)|i'$agent$match ) ) {
                                                  return 
    $match[0] ;
                                                 } else
                                                  if ( 
    preg_match'|SAM([^\s\/]+)|i'$agent$match ) ) {
                                                   return 
    $match[0] ;
                                                  } else
                                                   if ( 
    preg_match'|SEC([^\s\/]+)|i'$agent$match ) ) {
                                                    return 
    $match[0] ;
                                                   } else
                                                    if ( 
    preg_match'|SCH([^\s\/]+)|i'$agent$match ) ) {
                                                     return 
    $match[0] ;
                                                    } else
                                                     if ( 
    preg_match'|SGH([^\s\/]+)|i'$agent$match ) ) {
                                                      return 
    $match[0] ;
                                                     } else
                                                      if ( 
    preg_match'|SPH([^\s\/]+)|i'$agent$match ) ) {
                                                       return 
    $match[0] ;
                                                      } else
                                                       if ( 
    preg_match'|GT-([^\s\-\/]+)|i'$agent$match ) ) {
                                                        return 
    $match[0] ;
                                                       } else
                                                        if ( 
    preg_match'|HTC[\s\/]?([^\s\/\)\\\]*)|i'$agent$match ) ) {
                                                         return 
    str_replace( array( "-""_" ), " "$match[0] ) ;
                                                        } else
                                                         if ( 
    preg_match'|MOT-([^\s\;\_\/\.]+)|i'$agent$match ) ) {
                                                          return 
    $match[0] ;
                                                         } else
                                                          if ( 
    preg_match'|Motor([^\;\_\/\.\(\)]+)|i'$agent$match ) ) {
                                                           return 
    $match[0] ;
                                                          } else
                                                           if ( 
    preg_match'|LG(\/)?([^\s\/]*)|i'$agent$match ) ) {
                                                            return 
    $match[0] ;
                                                           } else
                                                            if ( 
    preg_match'|SAGEM([^\s\/]+)|i'$agent$match ) ) {
                                                             return 
    $match[0] ;
                                                            } else
                                                             if ( 
    preg_match'|SG([^\s\;\/\(\)]+)|i'$agent$match ) ) {
                                                              return 
    $match[0] ;
                                                             } else
                                                              if ( 
    preg_match'|PHILIPS(\s)?([^\s\_\/]*)|i'$agent$match ) ) {
                                                               return 
    $match[0] ;
                                                              } else
                                                               if ( 
    preg_match'|SHARP([^\s\/]+)|i'$agent$match ) ) {
                                                                return 
    $match[0] ;
                                                               } else
                                                                if ( 
    preg_match'|SIE([^\s\/]+)|i'$agent$match ) ) {
                                                                 return 
    $match[0] ;
                                                                } else
                                                                 if ( 
    preg_match'|Alcatel(\s)?([^\s\/]*)|i'$agent$match ) ) {
                                                                  return 
    $match[0] ;
                                                                 } else
                                                                  if ( 
    preg_match'|Panasonic(\s)?([^\s\/]*)|i'$agent$match ) ) {
                                                                   return 
    $match[0] ;
                                                                  } else
                                                                   if ( 
    preg_match'|Dopod(\s)?([^\_\/\Build]*)|i'$agent$match ) ) {
                                                                    return 
    $match[0] ;
                                                                   } else
                                                                    if ( 
    preg_match'|CHT([^\/]+)|i'$agent$match ) ) {
                                                                     return 
    $match[0] ;
                                                                    } else
                                                                     if ( 
    preg_match'|SPV(\s)?([^\s\;\/]*)|i'$agent$match ) ) {
                                                                      return 
    $match[0] ;
                                                                     } else
                                                                      if ( 
    preg_match'|NEC(\s)?([^\s\/]+)|i'$agent$match ) ) {
                                                                       return 
    $match[0] ;
                                                                      } else
                                                                       if ( 
    preg_match'|ASUS(\s)?([^\s\-\/]*)|i'$agent$match ) ) {
                                                                        return 
    $match[0] ;
                                                                       } else
                                                                        if ( 
    preg_match'|Toshiba(\s)?([^\_\/]*)|i'$agent$match ) ) {
                                                                         return 
    $match[0] ;
                                                                        } else
                                                                         if ( 
    preg_match'|BenQ(\s)?([^\s\/]+)|i'$agent$match ) ) {
                                                                          return 
    $match[0] ;
                                                                         } else
                                                                          if ( 
    preg_match'|Palm-([^\s\/\;\(\)]*)|i'$agent$match ) ) {
                                                                           return 
    $match[0] ;
                                                                          } else
                                                                           if ( 
    preg_match'|Palm(\s)?([^\s\/\(\)]*)|i'$agent$match ) ) {
                                                                            return 
    $match[0] ;
                                                                           } else
                                                                            if ( 
    preg_match'|Qtek([^\-\/]*)|i'$agent$match ) ) {
                                                                             return 
    $match[0] ;
                                                                            } else
                                                                             if ( 
    preg_match'|Amoi([^\/]*)|i'$agent$match ) ) {
                                                                              return 
    $match[0] ;
                                                                             } else
                                                                              if ( 
    preg_match'|Telit([^\/]*)|i'$agent$match ) ) {
                                                                               return 
    $match[0] ;
                                                                              } else
                                                                               if ( 
    preg_match'|Sendo([^\/]*)|i'$agent$match ) ) {
                                                                                return 
    $match[0] ;
                                                                               } else
                                                                                if ( 
    preg_match'|MobilePhone ([^\s\;\/]*)|i'$agent$match ) ) {
                                                                                 return 
    $match[0] ;
                                                                                } else
                                                                                 if ( 
    preg_match'|Sanyo(\s)?([^\s\;\/]*)|i'$agent$match ) ) {
                                                                                  return 
    $match[0] ;
                                                                                 } else
                                                                                  if ( 
    preg_match'|Huawei/1.0/(0)?(.*?)([^\/]+)|i'$agent$match ) ) {
                                                                                   return 
    $match[3] ;
                                                                                  } else
                                                                                   if ( 
    preg_match'|Huawei(\s)?(\/)?([^\s\/\;\)]*)|i'$agent$match ) ) {
                                                                                    return 
    $match[0] ;
                                                                                   } else
                                                                                    if ( 
    preg_match'|Nexian([^\s\/]*)|i'$agent$match ) ) {
                                                                                     return 
    $match[0] ;
                                                                                    } else
                                                                                     if ( 
    preg_match'|Pantech(\s)?([^\s\/]*)|i'$agent$match ) ) {
                                                                                      return 
    $match[0] ;
                                                                                     } else
                                                                                      if ( 
    preg_match'|i-mobile(\s)?([^\,\/]*)|i'$agent$match ) ) {
                                                                                       return 
    $match[0] ;
                                                                                      } else
                                                                                       if ( 
    preg_match'|Micromax(\s)?([^\s\-\/]*)|i'$agent$match ) ) {
                                                                                        return 
    $match[0] ;
                                                                                       } else
                                                                                        if ( 
    preg_match'|Cricket([^\s\/]*)|i'$agent$match ) ) {
                                                                                         return 
    $match[0] ;
                                                                                        } else
                                                                                         if ( 
    preg_match'|Fly(\s)?([^\s\/]*)|i'$agent$match ) ) {
                                                                                          return 
    $match[0] ;
                                                                                         } else
                                                                                          if ( 
    preg_match'|TIANYU(\s)?([^\s]*)|i'$agent$match ) ) {
                                                                                           return 
    $match[0] ;
                                                                                          } else
                                                                                           if ( 
    preg_match'|AUDIOVOX(\s)?([^\s\/]*)|i'$agent$match ) ) {
                                                                                            return 
    $match[0] ;
                                                                                           } else
                                                                                            if ( 
    preg_match'|CDM(\-)?([^\s\/]*)|i'$agent$match ) ) {
                                                                                             return 
    $match[0] ;
                                                                                            } else
                                                                                             if ( 
    preg_match'|LENOVO([^\s\/]+)|i'$agent$match ) ) {
                                                                                              return 
    $match[0] ;
                                                                                             } else
                                                                                              if ( 
    preg_match'|OPPO(\s)?([^\s\/]*)|i'$agent$match ) ) {
                                                                                               return 
    $match[0] ;
                                                                                              } else
                                                                                               if ( 
    preg_match'|SPICE(\s)?([^\s\/]*)|i'$agent$match ) ) {
                                                                                                return 
    $match[0] ;
                                                                                               } else
                                                                                                if ( 
    preg_match'|Meizu(\s)?([^\;\-\/\Build]*)|i'$agent$match ) ) {
                                                                                                 return 
    $match[0] ;
                                                                                                } else
                                                                                                 if ( 
    preg_match"|CometBird/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                  return 
    $match[0] ;
                                                                                                 } else
                                                                                                  if ( 
    preg_match'|Bird(\s)?([^\/]*)|i'$agent$match ) ) {
                                                                                                   return 
    $match[0] ;
                                                                                                  } else
                                                                                                   if ( 
    preg_match'|INN([^\s\/]+)|i'$agent$match ) ) {
                                                                                                    return 
    $match[0] ;
                                                                                                   } else
                                                                                                    if ( 
    preg_match'|KWC([^\s\/]+)|i'$agent$match ) ) {
                                                                                                     return 
    $match[0] ;
                                                                                                    } else
                                                                                                     if ( 
    preg_match'|LCT(\_)?([^\s\_\/]*)|i'$agent$match ) ) {
                                                                                                      return 
    $match[0] ;
                                                                                                     } else
                                                                                                      if ( 
    preg_match'|TCL(\_)?([^\s\_\/]*)|i'$agent$match ) ) {
                                                                                                       return 
    $match[0] ;
                                                                                                      } else
                                                                                                       if ( 
    preg_match'|TSM([^\s\/]+)|i'$agent$match ) ) {
                                                                                                        return 
    $match[0] ;
                                                                                                       } else
                                                                                                        if ( 
    preg_match'|Xda(\_)?([^\;\/]*)|i'$agent$match ) ) {
                                                                                                         return 
    $match[0] ;
                                                                                                        } else
                                                                                                         if ( 
    preg_match'|ZTE(\-)?([^\s\-\/\(\)]*)|i'$agent$match ) ) {
                                                                                                          return 
    $match[0] ;
                                                                                                         } else
                                                                                                          if ( 
    preg_match'|RT([^\s\/]+)|i'$agent$match ) ) {
                                                                                                           return 
    $match[0] ;
                                                                                                          } else
                                                                                                           if ( 
    preg_match'|O2([^\s\/]+)|i'$agent$match ) ) {
                                                                                                            return 
    $match[0] ;
                                                                                                           } else
                                                                                                            if ( 
    preg_match'|KDDI-([^\s]+)|i'$agent$match ) ) {
                                                                                                             return 
    $match[0] ;
                                                                                                            } else
                                                                                                             if ( 
    preg_match"|Kindle(\s)?([^\s]+)|i"$agent$match ) ) {
                                                                                                              return 
    $match[0] ;
                                                                                                             } else
                                                                                                              if ( 
    preg_match'|RIM Tablet([^\s]+)|i'$agent$match ) ) {
                                                                                                               return 
    $match[0] ;
                                                                                                              } else
                                                                                                               if ( 
    preg_match"|PlayStation BB Navigator (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                return 
    $match[0] ;
                                                                                                               } else
                                                                                                                if ( 
    preg_match"|PlayStation Portable|"$agent$match ) ) {
                                                                                                                 return 
    $match[0] ;
                                                                                                                } else
                                                                                                                 if ( 
    preg_match"|PlayStation(\s)?(\d{1})|"$agent$match ) ) {
                                                                                                                  return 
    $match[0] ;
                                                                                                                 } else
                                                                                                                  if ( 
    preg_match"|MiniBrowser?(\w+)/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                   return 
    $match[0] ;
                                                                                                                  } else
                                                                                                                   if ( 
    preg_match"|(Tablet)?(Maemo)? Browser (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                    return 
    $match[0] ;
                                                                                                                   } else
                                                                                                                    if ( 
    preg_match"|Skyfire/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                     return 
    $match[0] ;
                                                                                                                    } else
                                                                                                                     if ( 
    preg_match"|Bolt/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                      return 
    $match[0] ;
                                                                                                                     } else
                                                                                                                      if ( 
    preg_match"|jB5/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                       return 
    $match[0] ;
                                                                                                                      } else
                                                                                                                       if ( 
    preg_match"|TeaShark/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                        return 
    $match[0] ;
                                                                                                                       } else
                                                                                                                        if ( 
    preg_match"|SoftBank/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                         return 
    $match[0] ;
                                                                                                                        } else
                                                                                                                         if ( 
    preg_match"|NetFront/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                          return 
    $match[0] ;
                                                                                                                         } else
                                                                                                                          if ( 
    preg_match"|IEMobile(/)?(\s)?(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                           return 
    $match[0] ;
                                                                                                                          } else
                                                                                                                           if ( 
    preg_match"|MobileExplorer/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                            return 
    $match[0] ;
                                                                                                                           } else
                                                                                                                            if ( 
    preg_match"|Mobile Safari(\s)?(/)?(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                             return 
    $match[0] ;
                                                                                                                            } else
                                                                                                                             if ( 
    preg_match"|uZardWeb/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                              return 
    $match[0] ;
                                                                                                                             } else
                                                                                                                              if ( 
    preg_match"|Iris/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                               return 
    $match[0] ;
                                                                                                                              } else
                                                                                                                               if ( 
    preg_match"|Dolfin/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                return 
    $match[0] ;
                                                                                                                               } else
                                                                                                                                if ( 
    preg_match"|Minimo/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                 return 
    $match[0] ;
                                                                                                                                } else
                                                                                                                                 if ( 
    preg_match"|Fennec/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                  return 
    $match[0] ;
                                                                                                                                 } else
                                                                                                                                  if ( 
    preg_match"|Blazer (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                   return 
    $match[0] ;
                                                                                                                                  } else
                                                                                                                                   if ( 
    preg_match"|portalmmm/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                    return 
    $match[0] ;
                                                                                                                                   } else
                                                                                                                                    if ( 
    preg_match"|Internet Channel/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                     return 
    $match[0] ;
                                                                                                                                    } else
                                                                                                                                     if ( 
    preg_match"|Wii ([a-z]+) Channel/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                      return 
    $match[0] ;
                                                                                                                                     } else
                                                                                                                                      if ( 
    preg_match"|Nintendo Wii|"$agent$match ) ) {
                                                                                                                                       return 
    $match[0] ;
                                                                                                                                      } else
                                                                                                                                       if ( 
    preg_match"|TencentTraveler ([0-9\.]{0,3})|"$agent$match ) ) {
                                                                                                                                        return 
    $match[0] ;
                                                                                                                                       } else
                                                                                                                                        if ( 
    preg_match"|Google Wireless Transcoder|"$agent$match ) ) {
                                                                                                                                         return 
    $match[0] ;
                                                                                                                                        } else
                                                                                                                                         if ( 
    preg_match"|Netscape(/)?([0-9\.]{1,3})|"$agent$match ) ) {
                                                                                                                                          return 
    $match[0] ;
                                                                                                                                         } else
                                                                                                                                          if ( 
    preg_match"|Navigator/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                           return 
    "Netscape/" $match[1] ;
                                                                                                                                          } else
                                                                                                                                           if ( 
    preg_match"|SeaMonkey/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                            return 
    $match[0] ;
                                                                                                                                           } else
                                                                                                                                            if ( 
    preg_match"|Firebird/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                             return 
    $match[0] ;
                                                                                                                                            } else
                                                                                                                                             if ( 
    preg_match"|Blackbird/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                              return 
    $match[0] ;
                                                                                                                                             } else
                                                                                                                                              if ( 
    preg_match"|BlackHawk/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                               return 
    $match[0] ;
                                                                                                                                              } else
                                                                                                                                               if ( 
    preg_match"|Cheshire/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                return 
    $match[0] ;
                                                                                                                                               } else
                                                                                                                                                if ( 
    preg_match"|Deepnet Explorer (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                } else
                                                                                                                                                 if ( 
    preg_match"|Flock/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                 } else
                                                                                                                                                  if ( 
    preg_match"|Orca/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                  } else
                                                                                                                                                   if ( 
    preg_match"|OmniWeb/(v)?(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                   } else
                                                                                                                                                    if ( 
    preg_match"|Epiphany/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                    } else
                                                                                                                                                     if ( 
    preg_match"|MultiZilla v(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                     } else
                                                                                                                                                      if ( 
    preg_match"|Multi-Browser (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                      } else
                                                                                                                                                       if ( 
    preg_match"|UltraBrowser (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                       } else
                                                                                                                                                        if ( 
    preg_match"|UBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                         return 
    "UC Browser/" $match[1] ; // UC Browser desktop (Alibaba)
                                                                                                                                                        
    } else
                                                                                                                                                         if ( 
    preg_match"|QQBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                          return 
    str_ireplace"QQBrowser/""QQ/"$match[0] ) ; // QQ Browser desktop (Tencent)
                                                                                                                                                         
    } else
                                                                                                                                                          if ( 
    preg_match"|Slimjet/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                          } else
                                                                                                                                                           if ( 
    preg_match"|Comodo_Dragon/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                           } else
                                                                                                                                                            if ( 
    preg_match"|RockMelt/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                            } else
                                                                                                                                                             if ( 
    preg_match"|Torch/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                             } else
                                                                                                                                                              if ( 
    preg_match"|Sleipnir/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                              } else
                                                                                                                                                               if ( 
    preg_match"|SlimBoat/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                               } else
                                                                                                                                                                if ( 
    preg_match"|Avant Browser|"$agent$match ) ) {
                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                } else
                                                                                                                                                                 if ( 
    preg_match"|Iron/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                 } else
                                                                                                                                                                  if ( 
    preg_match"|Dragon/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                   return 
    "Comodo Dragon/" $match[1] ;
                                                                                                                                                                  } else
                                                                                                                                                                   if ( 
    preg_match"|MxBrowser/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                                    return 
    str_ireplace"MxBrowser/""Maxthon/"$match[0] ) ; // Maxthon Browser desktop (Maxthon)
                                                                                                                                                                   
    } else
                                                                                                                                                                    if ( 
    preg_match"|MSIE (\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                                     return 
    str_ireplace"MSIE ""Internet Explorer/"$match[0] ) ; // Internet Explorer Browser (Microsoft)
                                                                                                                                                                    
    } else
                                                                                                                                                                     if ( 
    preg_match"|Trident/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                                      return 
    $match[0] ; // Trident Browser (Microsoft)
                                                                                                                                                                     
    } else
                                                                                                                                                                      if ( 
    preg_match"|Edge/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                                       return 
    $match[0] ; // Edge Browser desktop (Microsoft)
                                                                                                                                                                      
    } else
                                                                                                                                                                       if ( 
    preg_match"|Opera/(\d{1,2}\.\d)|i"$agent$match ) && preg_match"|Version/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                        return 
    str_ireplace"Version/""Opera/"$match[0] ) ; // Opera Browser desktop (Opera)
                                                                                                                                                                       
    } else
                                                                                                                                                                        if ( 
    preg_match"|Opera(/)?(\s)?(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                                         return 
    $match[0] ; // Opera Browser desktop (Opera)
                                                                                                                                                                        
    } else
                                                                                                                                                                         if ( 
    preg_match"|Firefox/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                                          return 
    $match[0] ; // Firefox Browser mobile & desktop (Mozilla)
                                                                                                                                                                         
    } else
                                                                                                                                                                          if ( 
    preg_match"|Chrome/(\d{1,2}\.\d)|i"$agent$match ) ) {
                                                                                                                                                                           return 
    $match[0] ; // All Chrome Browser mobile & desktop (Google)
                                                                                                                                                                          
    } else
                                                                                                                                                                           if ( 
    preg_match"|Epic/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                           } else
                                                                                                                                                                            if ( 
    preg_match"|PaleMoon/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                            } else
                                                                                                                                                                             if ( 
    preg_match"|K-Meleon/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                             } else
                                                                                                                                                                              if ( 
    preg_match"|AOL (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                              } else
                                                                                                                                                                               if ( 
    preg_match"|Lunascape(\s)?(/)?(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                               } else
                                                                                                                                                                                if ( 
    preg_match"|Intel Mac OS X?(\s\d{1,2}\_\d)|i"$agent$match ) && preg_match"|Version/(\d{1,2}\.\d)|"$agent,
                                                                                                                                                                                 
    $match ) ) {
                                                                                                                                                                                 return 
    "Safari/" str_replace"_""."$match[1] ) ; // Safari Browser
                                                                                                                                                                                
    } else
                                                                                                                                                                                 if ( 
    preg_match"|Safari/(\d{3})|i"$agent$match ) && preg_match"|Version/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                  return 
    str_ireplace"Version/""Safari/"$match[0] ) ; // Safari Browser
                                                                                                                                                                                 
    } else
                                                                                                                                                                                  if ( 
    preg_match"|Konqueror/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                  } else
                                                                                                                                                                                   if ( 
    preg_match"|Camino/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                   } else
                                                                                                                                                                                    if ( 
    preg_match"|Lynx/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                    } else
                                                                                                                                                                                     if ( 
    preg_match"|AvantGo (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                     } else
                                                                                                                                                                                      if ( 
    preg_match"|EudoraWeb (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                      } else
                                                                                                                                                                                       if ( 
    preg_match"|Thunderbird/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                       } else
                                                                                                                                                                                        if ( 
    preg_match"|iTunes/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                        } else
                                                                                                                                                                                         if ( 
    preg_match"|QuickTime/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                         } else
                                                                                                                                                                                          if ( 
    preg_match"|Windows-Media-Player/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                          } else
                                                                                                                                                                                           if ( 
    preg_match"|Galeon/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                           } else
                                                                                                                                                                                            if ( 
    preg_match"|Amiga-AWeb/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                            } else
                                                                                                                                                                                             if ( 
    preg_match"|AmigaVoyager/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                             } else
                                                                                                                                                                                              if ( 
    preg_match"|iCab (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                              } else
                                                                                                                                                                                               if ( 
    preg_match"|amaya/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                               } else
                                                                                                                                                                                                if ( 
    preg_match"|facebook bot|"$agent$match ) ) {
                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                                                } else
                                                                                                                                                                                                 if ( 
    preg_match"|facebookscraper/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                                                 } else
                                                                                                                                                                                                  if ( 
    preg_match"|facebookexternalhit/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                                  } else
                                                                                                                                                                                                   if ( 
    preg_match"|Facebook FirePHP/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                                   } else
                                                                                                                                                                                                    if ( 
    preg_match"|Facebook API PHP(\d{1})|"$agent$match ) ) {
                                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                                    } else
                                                                                                                                                                                                     if ( 
    preg_match"|([A-Z]+)TB(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                                     } else
                                                                                                                                                                                                      if ( 
    preg_match"|Google/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                                      } else
                                                                                                                                                                                                       if ( 
    preg_match"|Googlebot(/)?(\s)?(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                                       } else
                                                                                                                                                                                                        if ( 
    preg_match"|Googlebot-Mobile/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                                        } else
                                                                                                                                                                                                         if ( 
    preg_match"|Googlebot FirePHP(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                                         } else
                                                                                                                                                                                                          if ( 
    preg_match"|Googlebot-Image(/)?(\s)?(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                                          } else
                                                                                                                                                                                                           if ( 
    preg_match"|Googlebot-Earth/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                                           } else
                                                                                                                                                                                                            if ( 
    preg_match"|Googlebot-Sitemaps/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                                            } else
                                                                                                                                                                                                             if ( 
    preg_match"|Googlebot-Site-Verification/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                                             } else
                                                                                                                                                                                                              if ( 
    preg_match"|Mediapartners-Google/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                                              } else
                                                                                                                                                                                                               if ( 
    preg_match"|Mediapartners-Google/PHP-proxy|"$agent$match ) ) {
                                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                                               } else
                                                                                                                                                                                                                if ( 
    preg_match"|Mediapartners-Google|"$agent$match ) ) {
                                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                                                                } else
                                                                                                                                                                                                                 if ( 
    preg_match"|AdsBot-Google-Mobile|"$agent$match ) ) {
                                                                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                                                                 } else
                                                                                                                                                                                                                  if ( 
    preg_match"|AdsBot-Google|"$agent$match ) ) {
                                                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                                                  } else
                                                                                                                                                                                                                   if ( 
    preg_match"|AppEngine-Google|"$agent$match ) ) {
                                                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                                                   } else
                                                                                                                                                                                                                    if ( 
    preg_match"|FeedFetcher-Google|"$agent$match ) ) {
                                                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                                                    } else
                                                                                                                                                                                                                     if ( 
    preg_match"|AOL Search|"$agent$match ) ) {
                                                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                                                     } else
                                                                                                                                                                                                                      if ( 
    preg_match"|AskBar (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                                                      } else
                                                                                                                                                                                                                       if ( 
    preg_match"|TeomaBar (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                                                       } else
                                                                                                                                                                                                                        if ( 
    preg_match"|Ask Jeeves/Teoma|"$agent$match ) ) {
                                                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                                                        } else
                                                                                                                                                                                                                         if ( 
    preg_match"|Ask Jeeves Corporate Spider|"$agent$match ) ) {
                                                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                                                         } else
                                                                                                                                                                                                                          if ( 
    preg_match"|FunWebProducts-AskJeeves|"$agent$match ) ) {
                                                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                                                          } else
                                                                                                                                                                                                                           if ( 
    preg_match"|BingSearch/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                                                           } else
                                                                                                                                                                                                                            if ( 
    preg_match"|bingbot/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                                                            } else
                                                                                                                                                                                                                             if ( 
    preg_match"|Msnbot(/)?(\s)?(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                                                             } else
                                                                                                                                                                                                                              if ( 
    preg_match"|msnbot-media/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                                                              } else
                                                                                                                                                                                                                               if ( 
    preg_match"|msnbot-Products/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                                                               } else
                                                                                                                                                                                                                                if ( 
    preg_match"|MSNAttackBot/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                                                                                } else
                                                                                                                                                                                                                                 if ( 
    preg_match"|MSMOBOT/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                                                                                 } else
                                                                                                                                                                                                                                  if ( 
    preg_match"|MSNBOT-MOBILE/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                                                                  } else
                                                                                                                                                                                                                                   if ( 
    preg_match"|MSMOBOT Mozilla/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                                                                   } else
                                                                                                                                                                                                                                    if ( 
    preg_match"|MSMOBOT CHTML|"$agent$match ) ) {
                                                                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                                                                    } else
                                                                                                                                                                                                                                     if ( 
    preg_match"|Twitterbot/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                                                                     } else
                                                                                                                                                                                                                                      if ( 
    preg_match"|Twitterrific/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                                                                      } else
                                                                                                                                                                                                                                       if ( 
    preg_match"|TwitterFonPro/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                                                                       } else
                                                                                                                                                                                                                                        if ( 
    preg_match"|TwitterResearch|"$agent$match ) ) {
                                                                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                                                                        } else
                                                                                                                                                                                                                                         if ( 
    preg_match"|TwitterIrcGateway|"$agent$match ) ) {
                                                                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                                                                         } else
                                                                                                                                                                                                                                          if ( 
    preg_match"|Yandex/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                                                                          } else
                                                                                                                                                                                                                                           if ( 
    preg_match"|YandexBot/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                                                                           } else
                                                                                                                                                                                                                                            if ( 
    preg_match"|YandexMedia/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                                                                            } else
                                                                                                                                                                                                                                             if ( 
    preg_match"|YandexImages/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                                                                             } else
                                                                                                                                                                                                                                              if ( 
    preg_match"|YandexFavicons/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                                                                              } else
                                                                                                                                                                                                                                               if ( 
    preg_match"|YandexZakladki/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                                                                               } else
                                                                                                                                                                                                                                                if ( 
    preg_match"|YandexAntivirus/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                                                                                                } else
                                                                                                                                                                                                                                                 if ( 
    preg_match"|yahoobot|"$agent$match ) ) {
                                                                                                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                                                                                                 } else
                                                                                                                                                                                                                                                  if ( 
    preg_match"|Y!J-([a-z0-9\.\/]{7}+)|i"$agent$match ) ) {
                                                                                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                                                                                  } else
                                                                                                                                                                                                                                                   if ( 
    preg_match"|Yahoo! Slurp/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                                                                                   } else
                                                                                                                                                                                                                                                    if ( 
    preg_match"|Yahoo! Slurp|"$agent$match ) ) {
                                                                                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                                                                                    } else
                                                                                                                                                                                                                                                     if ( 
    preg_match"|Yahoo-Test/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                                                                                     } else
                                                                                                                                                                                                                                                      if ( 
    preg_match"|Yahoo-Blogs/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                                                                                      } else
                                                                                                                                                                                                                                                       if ( 
    preg_match"|YahooSeeker/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                                                                                       } else
                                                                                                                                                                                                                                                        if ( 
    preg_match"|YahooFeedSeeker/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                                                                                        } else
                                                                                                                                                                                                                                                         if ( 
    preg_match"|YahooSeeker-Testing/v(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                                                                                         } else
                                                                                                                                                                                                                                                          if ( 
    preg_match"|Bloglines/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                                                                                          } else
                                                                                                                                                                                                                                                           if ( 
    preg_match"|Bloglines-Images/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                                                                                           } else
                                                                                                                                                                                                                                                            if ( 
    preg_match"|Baiduspider/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                                                                                            } else
                                                                                                                                                                                                                                                             if ( 
    preg_match"|Baiduspider-image+|"$agent$match ) ) {
                                                                                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                                                                                             } else
                                                                                                                                                                                                                                                              if ( 
    preg_match"|Baiduspider-favo+|"$agent$match ) ) {
                                                                                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                                                                                              } else
                                                                                                                                                                                                                                                               if ( 
    preg_match"|Baiduspider+|"$agent$match ) ) {
                                                                                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                                                                                               } else
                                                                                                                                                                                                                                                                if ( 
    preg_match"|archive_crawler/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                                                                                                                } else
                                                                                                                                                                                                                                                                 if ( 
    preg_match"|ia_archiver/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                                                                                                                 } else
                                                                                                                                                                                                                                                                  if ( 
    preg_match"|ia_archiver|"$agent$match ) ) {
                                                                                                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                                                                                                  } else
                                                                                                                                                                                                                                                                   if ( 
    preg_match"|Perl Crawler Robot v(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                                                                                                   } else
                                                                                                                                                                                                                                                                    if ( 
    preg_match"|Python-httplib(\d{1})|"$agent$match ) ) {
                                                                                                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                                                                                                    } else
                                                                                                                                                                                                                                                                     if ( 
    preg_match"|Python-urllib/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                                                                                                     } else
                                                                                                                                                                                                                                                                      if ( 
    preg_match"|Python (\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                                                                                                      } else
                                                                                                                                                                                                                                                                       if ( 
    preg_match"|PECL::HTTP/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                                                                                                       } else
                                                                                                                                                                                                                                                                        if ( 
    preg_match"|PEAR HTTP|"$agent$match ) ) {
                                                                                                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                                                                                                        } else
                                                                                                                                                                                                                                                                         if ( 
    preg_match"|HTTP_Request2/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                                                                                                         } else
                                                                                                                                                                                                                                                                          if ( 
    preg_match"|WordPress-Do-P-/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                                                                                                          } else
                                                                                                                                                                                                                                                                           if ( 
    preg_match"|WordPress-B-/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                                                                                                           } else
                                                                                                                                                                                                                                                                            if ( 
    preg_match"|WordPress/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                                                                                                            } else
                                                                                                                                                                                                                                                                             if ( 
    preg_match"|WordPress|"$agent$match ) ) {
                                                                                                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                                                                                                             } else
                                                                                                                                                                                                                                                                              if ( 
    preg_match"|WWW-Mechanize/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                                                                                                              } else
                                                                                                                                                                                                                                                                               if ( 
    preg_match"|DoCoMo/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                                                                                                               } else
                                                                                                                                                                                                                                                                                if ( 
    preg_match"|Charlotte/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                                                                                                                                } else
                                                                                                                                                                                                                                                                                 if ( 
    preg_match"|ZyBorg/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                                                                                                                                 } else
                                                                                                                                                                                                                                                                                  if ( 
    preg_match"|event_fetcher/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                                                                                                                  } else
                                                                                                                                                                                                                                                                                   if ( 
    preg_match"|gonzo[/]?(\d{1})|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                                                                                                                   } else
                                                                                                                                                                                                                                                                                    if ( 
    preg_match"|Semager/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                                                                                                                    } else
                                                                                                                                                                                                                                                                                     if ( 
    preg_match"|ReqwirelessWeb/(\d{1,2}\.\d)|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                                                                                                                     } else
                                                                                                                                                                                                                                                                                      if ( 
    preg_match'|(http://)?(\www.)?tastez.ro|'$agent$match ) ) {
                                                                                                                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                                                                                                                      } else
                                                                                                                                                                                                                                                                                       if ( 
    preg_match'|http://Anonymouse.org|'$agent$match ) ) {
                                                                                                                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                                                                                                                       } else
                                                                                                                                                                                                                                                                                        if ( 
    preg_match"|http://www.80legs.com|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                                                                                                                        } else
                                                                                                                                                                                                                                                                                         if ( 
    preg_match"|iCjobs Stellenangebote Jobs|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                                                                                                                         } else
                                                                                                                                                                                                                                                                                          if ( 
    preg_match"|Seznam screenshot-generator|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                                                                                                                          } else
                                                                                                                                                                                                                                                                                           if ( 
    preg_match'|Download Master|'$agent$match ) ) {
                                                                                                                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                                                                                                                           } else
                                                                                                                                                                                                                                                                                            if ( 
    preg_match"|OPENWAVE|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                                                                                                                            } else
                                                                                                                                                                                                                                                                                             if ( 
    preg_match"|MAUI|i"$agent$match ) ) {
                                                                                                                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                                                                                                                             } else
                                                                                                                                                                                                                                                                                              if ( 
    preg_match"|Twiceler|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                                                                                                                              } else
                                                                                                                                                                                                                                                                                               if ( 
    preg_match"|Teemer|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                                                                                                                               } else
                                                                                                                                                                                                                                                                                                if ( 
    preg_match"|ELinks|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                } else
                                                                                                                                                                                                                                                                                                 if ( 
    preg_match"|yacybot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                  return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                 } else
                                                                                                                                                                                                                                                                                                  if ( 
    preg_match"|cometrics-bot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                   return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                  } else
                                                                                                                                                                                                                                                                                                   if ( 
    preg_match"|infometrics-bot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                    return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                   } else
                                                                                                                                                                                                                                                                                                    if ( 
    preg_match"|webmeasurement-bot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                     return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                    } else
                                                                                                                                                                                                                                                                                                     if ( 
    preg_match"|Linguee Bot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                      return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                     } else
                                                                                                                                                                                                                                                                                                      if ( 
    preg_match"|SEOkicks-Robot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                       return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                      } else
                                                                                                                                                                                                                                                                                                       if ( 
    preg_match"|Cityreview Robot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                        return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                       } else
                                                                                                                                                                                                                                                                                                        if ( 
    preg_match"|URL-Expander-Bot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                         return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                        } else
                                                                                                                                                                                                                                                                                                         if ( 
    preg_match"|Yanga WorldSearch Bot|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                          return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                         } else
                                                                                                                                                                                                                                                                                                          if ( 
    preg_match"|Speedy Spider|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                           return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                          } else
                                                                                                                                                                                                                                                                                                           if ( 
    preg_match"|Nusearch Spider|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                            return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                           } else
                                                                                                                                                                                                                                                                                                            if ( 
    preg_match"|iCCrawler|i"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                             return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                            } else
                                                                                                                                                                                                                                                                                                             if ( 
    preg_match"|MSIECrawler|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                              return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                             } else
                                                                                                                                                                                                                                                                                                              if ( 
    preg_match"|GVC WEB crawler|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                               return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                              } else
                                                                                                                                                                                                                                                                                                               if ( 
    preg_match"|LINK TRADE crawler|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                                return 
    $match[0] ;
                                                                                                                                                                                                                                                                                                               } else
                                                                                                                                                                                                                                                                                                                if ( 
    preg_match"|Krugle web crawler|"$agent$match ) ) {
                                                                                                                                                                                                                                                                                                                 return 
    $match[0] ;
                                                                                                          &nbs