Full Browser info on Lavalair

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

    Full Browser info on Lavalair

    Hi,when i look on user profile i want to see full browser infi,now it says for example Browser:Opera 9.80,bu i want to say Browser:Opera 9.80/Nokia E5. Can someone help me to solve this problem.Thank you very much

    #2
    remove the explode($browser) from index.php - you may also want to change the browser field in the database to contain 255 characters

    Comment


      #3
      Thanks i will try it

      Comment


        #4
        $brws = explode(" ",$_SERVER["HTTP_USER_AGENT"]);
        $ubr = $brws[0];
        What to write instead explode because i cant get $ubr

        Comment


          #5
          $ubr = $_SERVER["HTTP_USER_AGENT"];

          you may also want to use mysql_escape_string() to stop any browser sql injections

          eg:

          $ubr = mysql_escape_string($_SERVER["HTTP_USER_AGENT"]);
          Last edited by something else; 19.05.15, 07:46.

          Comment


            #6
            Thanks,but i must replace mysql_escape_string with mysql_real_escape_string because it will send error

            Comment


              #7
              oops yes lol

              Comment


                #8
                Than you very much,it worked perfectly,i have one question:Does anyone know how to upload smilies with code directly from phone/computer because when i upload smilies i must enter url of the smiley and then when you send pm it gets reported

                Comment


                  #9
                  Now on browser is showing opera9.80/(Android bla bla) but not phone model

                  Comment


                    #10
                    Originally posted by stefan998 View Post
                    Than you very much,it worked perfectly,i have one question:Does anyone know how to upload smilies with code directly from phone/computer because when i upload smilies i must enter url of the smiley and then when you send pm it gets reported
                    Don't add it with http, add just folder location.

                    ./folder/smiles/smile.gif

                    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

                    Comment


                      #11
                      Originally posted by stefan998 View Post
                      Now on browser is showing opera9.80/(Android bla bla) but not phone model
                      See this: http://coding-talk.com/forum/main-fo...eal-user-agent
                      <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

                      Comment


                        #12
                        PHP Code:
                        //////

                        $ubr = isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) ? mysql_real_escape_string($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) : mysql_real_escape_string($_SERVER['HTTP_USER_AGENT']);


                        ////// 

                        Comment


                          #13
                          Sorry didnt see your post arnage

                          Comment


                            #14
                            Originally posted by stefan998 View Post
                            Hi,when i look on user profile i want to see full browser infi,now it says for example Browser:Opera 9.80,bu i want to say Browser:Opera 9.80/Nokia E5. Can someone help me to solve this problem.Thank you very much
                            copy this code and paste in index.php

                            PHP Code:
                            $agent mysql_real_escape_string ($_SERVER['HTTP_USER_AGENT']);
                            $agent2 $agent
                            now put this code in core

                            PHP Code:
                            ///////////////////////////////////////////Get Browser in detail

                            function getbrowser_uid($uid)
                            {
                              
                            $not mysql_fetch_array(mysql_query("SELECT useragent FROM ibwf_users WHERE id='".$uid."'"));
                              return 
                            $not[0];



                            now put this new table in ibwf_users

                            PHP Code:
                            `useragentvarchar(250NOT NULL
                            make sure u put this code in index.php else it will show blank

                            PHP Code:
                            $res mysql_query("UPDATE ibwf_users SET browserm='".$ubr."', useragent='".$agent2."', ipadd='".$uip."' WHERE id='".getuid_sid($sid)."'"); 


                            now put this in user profile to see their user agent

                            PHP Code:
                            $nopli mysql_fetch_array(mysql_query("SELECT useragent FROM ibwf_users WHERE id='".$who."'"));
                              echo 
                            "User Agent Details:</b> $nopli[0]<br/>"
                            Last edited by thunderwap; 21.05.15, 05:35.
                            sigpic

                            WANT GOOD CHEAP HOSTING WITH 99% UPTIME? THEN PM ME FOR DETAILS!!

                            Comment


                              #15
                              Originally posted by stefan998 View Post
                              Thanks,but i must replace mysql_escape_string with mysql_real_escape_string because it will send error
                              practice using mysqli instead of mysql mysql will be depreciated soon

                              http://wapx.amob.com
                              Applications, Games, Wallpapers, Ringtones, Videos, Themes, Screensaver and More!!!

                              Comment

                              Working...
                              X