ip help

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

    ip help

    hello

    some users in my site uses opera mini or uc mini browser.their having 2 ips because opera mini ip also displays in their profile. eg. 106.79.83.85,107.167.108.205

    107.167.108.205 is opear mini server ip.... how can i show only 1 ip in their profile if users using opera mini or uc mini browser?
    sigpic

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

    #2
    split the string by comma into array, and show the first or second value
    Advertise your mobile site for FREE with AdTwirl

    Comment


      #3
      any other way except it?
      sigpic

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

      Comment


        #4
        there is no way around it
        Advertise your mobile site for FREE with AdTwirl

        Comment


          #5
          it didnt worked

          PHP Code:
          $uipadd mysql_fetch_array(mysql_query("SELECT ipadd FROM siteusers WHERE id='".$who."'"));
          $ip2=explode(",",$uipadd);
          if(
          strpos($ip2[0],",")){
          $web=explode(",",$uipadd);
          $uipadd=$web[0];
          }


            echo 
          "<center><b>Ip:</b> <a href="lists.php?action=byip&amp;who=$who">$uipadd</a></center>"
          Last edited by thunderwap; 10.08.15, 08:55.
          sigpic

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

          Comment


            #6
            PHP Code:
            $db_arr mysql_fetch_array(mysql_query("SELECT ipadd FROM siteusers WHERE id='".$who."'"));
            $arr explode(',',$db_arr['ipadd']);
            $ip $arr[0];


              echo 
            '<center><b>Ip:</b> <a href="lists.php?action=byip&amp;who='.$who.'">'.$ip.'</a></center>'
            Advertise your mobile site for FREE with AdTwirl

            Comment


              #7
              Originally posted by GumSlone View Post
              PHP Code:
              $db_arr mysql_fetch_array(mysql_query("SELECT ipadd FROM siteusers WHERE id='".$who."'"));
              $arr explode(',',$db_arr['ipadd']);
              $ip $arr[0];


              echo 
              '<center><b>Ip:</b> <a href="lists.php?action=byip&amp;who='.$who.'">'.$ip.'</a></center>'
              i tried as u given code.but still not working.same problem as like before
              sigpic

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

              Comment


                #8
                but how? it should show only 1 ip with the code above
                Advertise your mobile site for FREE with AdTwirl

                Comment


                  #9
                  it shows both ip as like before. i done as you said in above code.there is no error it showing but it performs the same task as like before.
                  sigpic

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

                  Comment


                    #10
                    PHP Code:
                    $arr explode(',',$db_arr['ipadd']); 
                    this code explodes comma separated ip,

                    PHP Code:
                    $ip $arr[0]; 
                    this one will show the first ip, even if there are no comma separated list
                    Advertise your mobile site for FREE with AdTwirl

                    Comment


                      #11
                      strange. seems to work for me. when testing it.
                      Last edited by Ghost; 14.08.15, 13:39.
                      <?php
                      include ('Ghost');
                      if ($Post == true) {
                      echo '

                      sigpic
                      alt='coding-talk.com!!' />';
                      echo 'Sharing Is Caring!';
                      } else {
                      echo '

                      alt='the username GHOST has been comprimised!' />';
                      echo 'OMG SOMEBODY HELP ME!!';
                      }
                      ?>

                      Comment


                        #12
                        I think it shows 106.79.83.85107.167.108.205 or 106.79.83.85 107.167.108.205 and not 106.79.83.85,107.167.108.205
                        Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com

                        Comment


                          #13
                          Originally posted by GumSlone View Post
                          PHP Code:
                          $arr explode(',',$db_arr['ipadd']); 
                          this code explodes comma separated ip,

                          PHP Code:
                          $ip $arr[0]; 
                          this one will show the first ip, even if there are no comma separated list
                          thanks for info.

                          explode means to convert string into array by using comma? is it rite?

                          and

                          implode means to convert array into string by using comma? is it rite?
                          Last edited by thunderwap; 15.08.15, 07:17.
                          sigpic

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

                          Comment


                            #14
                            Originally posted by thunderwap View Post
                            thanks for info.

                            explode means to convert string into array by using comma? is it rite?

                            and

                            implode means to convert array into string by using comma? is it rite?
                            yes correct, but it can be comma or any other symbol that you assign to the function
                            Advertise your mobile site for FREE with AdTwirl

                            Comment


                              #15
                              Originally posted by kevk3v View Post
                              I think it shows 106.79.83.85107.167.108.205 or 106.79.83.85 107.167.108.205 and not 106.79.83.85,107.167.108.205
                              the ips from opera mini / ucweb and other proxy browser are usually listed by comma, anyway it seems that he has some different values in the database
                              Advertise your mobile site for FREE with AdTwirl

                              Comment

                              Working...
                              X