• Resolved Serpentsoft

    (@serpentsoft)


    Hi Pal, Thanks for this great plugin it help me a lot

    I’m using 2 shortcodes in my theme and [geoip_detect_get_info_from_ip] to get user info and it was working very good but suddenly after refresh page i got these notices and external IP returned [0.0.0.0]

    $cur_ip = do_shortcode('[geoip_detect2_get_external_ip_adress]');
    
    $client_ip = do_shortcode('[geoip_detect2_get_client_ip]');
    
    $user_info = geoip_detect_get_info_from_ip( $cur_ip );

    /* Errors */
    Notice: _geoip_detect_get_external_ip_adress_without_cache(): Curl error (http://v4.ident.me): cURL error 28: Resolving timed out after 1516 milliseconds in ..\wp-content\plugins\geoip-detect\geoip-detect-lib.php on line 329

    Notice: _geoip_detect_get_external_ip_adress_without_cache(): Curl error (http://bot.whatismyipaddress.com): cURL error 7: Failed to connect to bot.whatismyipaddress.com port 80: Network unreachable in ..\wp-content\plugins\geoip-detect\geoip-detect-lib.php on line 329

    Notice: _geoip_detect_get_external_ip_adress_without_cache(): Curl error (http://ipv4.icanhazip.com): cURL error 28: Operation timed out after 1000 milliseconds with 0 bytes received in ..\wp-content\plugins\geoip-detect\geoip-detect-lib.php on line 329

    Notice: Lookup Error: The address 0.0.0.0 is not in the database. in ..\wp-content\plugins\geoip-detect\api.php on line 72

    Notice: Lookup Error: The address 0.0.0.0 is not in the database. in ..\wp-content\plugins\geoip-detect\api.php on line 72

    Thanks a lot for your support.

Viewing 1 replies (of 1 total)
  • Plugin Author Benjamin Pick

    (@benjamin4)

    This normally happens when your server is not connected to the internet. The reason the result is cached is because otherwise all request would be delayed by 5 seconds or so (until the connection timeouts kick in). For you local development, I’d recommend specifying an external IP in the plugin options.

    Wait, why do you want the information of the server ($user_info)? Normally you’d use $user_info = geoip_detect2_get_info_from_current_ip() to get the information of the client. It automatically falls back to the server ip if the client IP is a local IP adress.

Viewing 1 replies (of 1 total)
  • The topic ‘External IP returns [0.0.0.0]’ is closed to new replies.