• I’m trying to get this to work but it looks like the instructions might be missing a piece. How do yo provide an IP as input??

    it looks like you’d want to do it on this line:
    $ip2country_info = ip2country_info($ip2country->country_code);

    i tried:
    $ip2country_info = ip2country_info(‘174.100.104.123’);

    didn’t work.

    Thanks

    https://www.ads-software.com/extend/plugins/ip2country/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author webvitaly

    (@webvitaly)

    Did you added db-dump to your database as it was written on installation page?

    Thread Starter btsander

    (@btsander)

    yes… it looks like I get a lat and long only but it’s actually way off. is the syntax I wrote correct?
    $ip2country_info = ip2country_info(‘174.100.104.123’);

    Plugin Author webvitaly

    (@webvitaly)

    Code should be like this:

    $ip2country = ip2country('212.113.46.148');
    $ip2country_info = ip2country_info($ip2country->country_code);
    echo ' iso_code_2: '.$ip2country_info->iso_code_2;
    echo ' iso_code_3: '.$ip2country_info->iso_code_3;
    echo ' iso_country: '.$ip2country_info->iso_country;
    echo ' country: '.$ip2country_info->country;
    echo ' lat: '.$ip2country_info->lat;
    echo ' lon: '.$ip2country_info->lon;

    Sorry for not replying same day, was busy.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Ip2country] Inserting IP’ is closed to new replies.