ip problem

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

    ip problem

    hello

    why google and my site shows weird ip address of me. i checked few other ip check sites and they showed well in i.e ip2location.com

    please see screenshot of google showing my ip

    my site also showing same ip as google showing. but in other few sites it shows my real ip address.

    what is the wrong with my code in php?

    i am using

    PHP Code:
     $myip $_SERVER["REMOTE_ADDR"];  

    echo 
    "$myip"
    i also tried explode method with it but though it shows same error

    please see screenshot.
    Attached Files
    sigpic

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

    #2
    I think this is the new version of ip addresses bro nothing to worry about....and to my knowledge the code looks perfectly fine

    Comment


      #3
      It's your IP, you may be expecting IPv4, but your ISP use's IPv6

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

      Comment


        #4
        what do i do to show ip adddress even if my isp uses IPv6?

        i want to show both IPv4 and IPv6


        will this work if i use

        PHP Code:
        function get_client_ip() {
        $ipaddress '';
        if (isset(
        $_SERVER['HTTP_CLIENT_IP']))
        $ipaddress $_SERVER['HTTP_CLIENT_IP'];
        else if(isset(
        $_SERVER['HTTP_X_FORWARDED_FOR']))
        $ipaddress $_SERVER['HTTP_X_FORWARDED_FOR'];
        else if(isset(
        $_SERVER['HTTP_X_FORWARDED']))
        $ipaddress $_SERVER['HTTP_X_FORWARDED'];
        else if(isset(
        $_SERVER['HTTP_FORWARDED_FOR']))
        $ipaddress $_SERVER['HTTP_FORWARDED_FOR'];
        else if(isset(
        $_SERVER['HTTP_FORWARDED']))
        $ipaddress $_SERVER['HTTP_FORWARDED'];
        else if(isset(
        $_SERVER['REMOTE_ADDR']))
        $ipaddress $_SERVER['REMOTE_ADDR'];
        else
        $ipaddress 'UNKNOWN';
        return 
        $ipaddress;

        sigpic

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

        Comment


          #5
          PHP Code:
          function getIp()
          {
              
          $ip $_SERVER['REMOTE_ADDR'];
              if(
          substr_count($ip,':')>2)
              {
                  
          $ip hexdec(substr($ip02)). "." hexdec(substr($ip22)). "." hexdec(substr($ip52)). "." hexdec(substr($ip72));
              }
              return 
          $ip;

          Last edited by something else; 14.03.17, 16:36.

          Comment

          Working...
          X