WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Ip2country] Inserting IP

[Plugin: Ip2country] Inserting IP

  • 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

    http://wordpress.org/extend/plugins/ip2country/

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

    @webvitaly

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

    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 webvitalii
    Participant

    @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.