Title: [Plugin: Ip2country] Inserting IP
Last modified: August 20, 2016

---

# [Plugin: Ip2country] Inserting IP

 *  [btsander](https://wordpress.org/support/users/btsander/)
 * (@btsander)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/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/](http://wordpress.org/extend/plugins/ip2country/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [webvitalii](https://wordpress.org/support/users/webvitaly/)
 * (@webvitaly)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-ip2country-inserting-ip/#post-2560717)
 * Did you added db-dump to your database as it was written on [installation](http://wordpress.org/extend/plugins/ip2country/installation/)
   page?
 *  Thread Starter [btsander](https://wordpress.org/support/users/btsander/)
 * (@btsander)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/plugin-ip2country-inserting-ip/#post-2560725)
 * 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](https://wordpress.org/support/users/webvitaly/)
 * (@webvitaly)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-ip2country-inserting-ip/#post-2560777)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/ip2country.svg)
 * [Ip2country](https://wordpress.org/plugins/ip2country/)
 * [Support Threads](https://wordpress.org/support/plugin/ip2country/)
 * [Active Topics](https://wordpress.org/support/plugin/ip2country/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ip2country/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ip2country/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [webvitalii](https://wordpress.org/support/users/webvitaly/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-ip2country-inserting-ip/#post-2560777)
 * Status: not resolved