• Resolved dedrago

    (@dedrago)



    Dear Damiarita,

    First of all, thank you again for your plugin and all your help.

    During my work I faced the problem of ipinfo.io limits. It has limits like 1000 API requests per 24 hours.

    May I suggest using freegeoip.net instead? It has 15000 API requests limit per one hour.

    geoIpLookup:function(t){jQuery.get("//freegeoip.net/json",function(){},"jsonp").always(function(e){var n=e&&e.country_code?e.country_code:"";t(n)})}};

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author damiarita

    (@damiarita)

    Hi,

    I loved the idea.

    I just released v 1.5.2 with this change.

    Thanks for the code!

    It seems like freegeoip.net now requires an api-key and the plugin fails in the execution.

    @sveinhansen Hey, try this one

    var intl_tel_default_setting={
    initialCountry: “auto”,
    utilsScript: wpcf7_utils_url,
    geoIpLookup: function(callback) {
    jQuery.get(‘https://geoip.nekudo.com/api’, function() {}, “jsonp”).always(function(resp) {
    var countryCode = (resp && resp.country.code) ? resp.country.code : “”;
    callback(countryCode);
    });
    }
    };

    Also do the same for script.min.js.

    • This reply was modified 7 months, 1 week ago by  dedrago.
    OC2PS

    (@sooskriszta)

    Not working for me. I get a blank grey rectangle instead of flag for default country.

    Is there a solution? The above code doesn’t work for me either.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.