Fetch Browser Info From Members

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

    Fetch Browser Info From Members

    I need sum! to show me how i can fetch browser ino from members on my site.

    im using this code <div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    echo "Browser: $nopl[0]
    ";</div>

    and then theres the table value. can any1 help?

    #2
    I need sum! to show me how i can fetch browser ino from members on my site.

    im using this code <div class='codetop'>CODE
    <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
    echo "Browser: $nopl[0]
    ";</div>

    and then theres the table value. can any1 help?[/b][/quote]


    $sql = "INSERT INTO ibwf_users(Browser) VALUES
    (&#39;$browser&#39;)";
    $result = mysql_query($sql)


    thats to save it into broswer

    and try `browser` varchar(120) NOT NULL default &#39;&#39;,

    for table ope thats what yu wanted
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      that was just a quess and myt b wrong
      Want something coded email me at sales@webnwaphost.com for a prices.




      Comment


        #4
        the table looks right but im not sure about code as its still not working

        Comment


          #5
          get the info by

          Code:
          $brws = $_SERVER[&#39;HTTP_USER_AGENT&#39;];
          and to show it just do
          Code:
          echo "Browser $brws";

          Comment


            #6
            i have checked, but for sum reason its not pulling browser info from users. but wen i add it into the script i am creating, it works fine.

            Comment


              #7
              i have checked, but for sum reason its not pulling browser info from users. but wen i add it into the script i am creating, it works fine.[/b]
              u have 2 turn php globals ON

              u cn do it in another way also but this is an easiest way....
              sigpiceeeeerrr....

              Comment


                #8
                its your hosting problem,delete the .htaccess file and upload this .htaccess file
                having this this code
                Code:
                php_flag register_globals on

                Comment


                  #9
                  its your hosting problem,delete the .htaccess file and upload this .htaccess file
                  having this this code
                  Code:
                  php_flag register_globals on
                  [/b]
                  where is the file, that i must use

                  Comment


                    #10
                    where is the file, that i must use[/b]
                    public_html or www directory or the directory where you upload your script with your ftp account

                    Comment


                      #11
                      I need sum! to show me how i can fetch browser ino from members on my site.

                      im using this code <div class='codetop'>CODE
                      <div class='codemain' style='height:200px;white-space:pre;overflow:auto'>$nopl = mysql_fetch_array(mysql_query("SELECT browserm FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
                      echo "Browser: $nopl[0]
                      ";</div>

                      and then theres the table value. can any1 help?[/b][/quote]
                      <div align="center">you change this code

                      $brws = explode("/",$HTTP_USER_AGENT);
                      (change to)

                      $brws = explode(" ",$_SERVER[HTTP_USER_AGENT] );
                      its work</div>

                      Comment


                        #12
                        Code:
                        $nopl = mysql_fetch_array(mysql_query("SELECT * FROM ibwf_users WHERE id=&#39;".$who."&#39;"));
                        echo "Browser: [b]".$nopl["browserm"]."[/b]
                        ";
                        that should do it :D

                        Comment


                          #13
                          you DO NOT need register globals ON .. anyone that tells you otherwise should be shot.. its a major security risk.. anyone that even has it on in php.ini still should really think of shutting down their own sites before someone else does.

                          $_SERVER is a super global .. it does not rely on register globals .. register globals does the same as the php function extract() .. register globals will take $_POST[&#39;xxx&#39;] and automatically assign it too $xxx .. which is a variable within the local scope .. so if i then set index.php?xxx=DROP TABLE WHATEVER , this becomes
                          Code:
                          $_POST[&#39;xxx&#39;] = "ABC";
                          $xxx = "ABC";
                          
                          $_GET[&#39;xxx&#39;] = "ABC";
                          $xxx = "DROP ........";
                          as you can see what i entered in teh URL has overiden the post var and im dropping your mysql tables

                          ----

                          $_SERVER[&#39;HTTP_USER_AGENT&#39;] will work

                          so will

                          $HTTP_SERVER_VARS[&#39;HTTP_USER_AGENT&#39;] as long as you have register_long_arrays enabled

                          Comment

                          Working...
                          X