detect real user agent

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

    #16
    Oh check this out guys Detect Real User Agent (Original Code) enjoy ;)
    www.inbuzunar.mobi - Your mobile portal pocket

    Comment


      #17
      Originally posted by kiss View Post
      Oh check this out guys Detect Real User Agent (Original Code) enjoy ;)
      thanks for share but this is not what i need for my sites,
      i prefer the code which in the first post.
      Advertise your mobile site for FREE with AdTwirl

      Comment


        #18
        Originally posted by GumSlone View Post
        PHP Code:
        function gum_real_ua()
        {
        //GET REAL DEVICE USER AGENT
             
        $keyname_ua_arr = array('HTTP_X_ORIGINAL_USER_AGENT','HTTP_X_DEVICE_USER_AGENT''HTTP_X_OPERAMINI_PHONE_UA','HTTP_X_BOLT_PHONE_UA''HTTP_X_MOBILE_UA''HTTP_USER_AGENT');
            foreach (
        $keyname_ua_arr as $keyname_ua) {
                if (!empty(
        $_SERVER[$keyname_ua])) {
                    return 
        $_SERVER[$keyname_ua]; //REAL UA
                    
        break;
                }
            }

        Where to put this code

        Comment


          #19
          Originally posted by stefan998 View Post

          Where to put this code
          anywhere you want to detect and use the real user agent
          Advertise your mobile site for FREE with AdTwirl

          Comment


            #20
            PHP Code:
             function ua()
             {
              
            $ua = array(
               
            'HTTP_DEVICE_STOCK_UA',
               
            'HTTP_X_DEVICE_USER_AGENT',
               
            'HTTP_X_ORIGINAL_USER_AGENT',
               
            'HTTP_X_UCBROWSER_DEVICE_UA',
               
            'HTTP_X_OPERAMINI_PHONE_UA',
               
            'HTTP_X_SKYFIRE_PHONE',
               
            'HTTP_X_BOLT_PHONE_UA',
               
            'HTTP_X_PUFFIN_UA',
               
            'HTTP_X_MOBILE_UA',
               
            'HTTP_X_SCANNER',
               
            'HTTP_FROM',
               
            'HTTP_USER_AGENT' ) ;
              foreach ( 
            $ua as $real_ua ) {
               if ( ! empty( 
            $_SERVER[$real_ua] ) ) {
                return 
            $_SERVER[$real_ua] ;
                break ;
               }
              }
             } 
            Last edited by kiss; 14.06.19, 14:16.
            www.inbuzunar.mobi - Your mobile portal pocket

            Comment

            Working...
            X