[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"$f_q7Ki9T52Mhlx0pPQBi-KCCzKo6fc_QgEwoSE1JwckE":3},{"slug":4,"display_name":5,"profile_url":6,"plugin_count":7,"total_installs":8,"avg_security_score":9,"avg_patch_time_days":10,"trust_score":11,"computed_at":12,"plugins":13},"pepaknet","pepak.net","https:\u002F\u002Fprofiles.wordpress.org\u002Fpepaknet\u002F",1,20,85,30,84,"2026-05-20T08:59:37.234Z",[14],{"slug":15,"name":16,"version":17,"author":5,"author_profile":6,"description":18,"short_description":19,"active_installs":8,"downloaded":20,"rating":21,"num_ratings":7,"last_updated":22,"tested_up_to":23,"requires_at_least":24,"requires_php":25,"tags":26,"homepage":31,"download_link":32,"security_score":9,"vuln_count":33,"unpatched_count":33,"last_vuln_date":34,"fetched_at":35},"ip-to-country","IP-to-Country","0.08","\u003Cp>IP-to-Country is a plugin which doesn’t provide any output to users, but which\u003Cbr \u002F>\nmay be used by plugin authors to quickly and easily find, in which country an\u003Cbr \u002F>\nIP address is located.\u003C\u002Fp>\n\u003Cp>To do so the plugin uses data files from either http:\u002F\u002Fip-to-country.webhosting.info\u003Cbr \u002F>\n(IPv4 only) or http:\u002F\u002Fsoftware77.net\u002Fgeo-ip\u002F (both IPv4 and IPv6).\u003Cbr \u002F>\nOther sources are possible as long as they have the same format: CSV file,\u003Cbr \u002F>\nfields enclosed with quotes (“) and separated with comma (,), lines ending\u003Cbr \u002F>\nwith LF (\\n). Five columns:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Lower bound of an IP range.\u003C\u002Fli>\n\u003Cli>Upper bound of an IP range. Both are represented as one 32-bit integer number,\u003Cbr \u002F>\nsuch as you can get by using funtion ip2long().\u003C\u002Fli>\n\u003Cli>2-character country code\u003C\u002Fli>\n\u003Cli>3-character country code\u003C\u002Fli>\n\u003Cli>Country name\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Note: In order to import IPv6 addresses, IPv4 must be imported first. The\u003Cbr \u002F>\nreason is, IPv6 database does not carry the full country information with\u003Cbr \u002F>\nit, while the IPv4 database does.\u003C\u002Fp>\n\u003Cp>Operations:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\n\u003Cp>To detect if IP-to-Country plugin is installed:\u003C\u002Fp>\n\u003Cp>$ip2c_available = class_exists(‘PepakIpToCountry’);\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>To find information about a numeric IP address:\u003C\u002Fp>\n\u003Cp>$country = PepakIpToCountry::IP_to_Country_Full(‘8.8.8.8’);\u003Cbr \u002F>\n    \u002F\u002F returns ‘UNITED STATES’\u003Cbr \u002F>\n    $country = PepakIpToCountry::IP_to_Country(‘8.8.8.8’);\u003Cbr \u002F>\n    $country = PepakIpToCountry::IP_to_Country_XX(‘8.8.8.8’);\u003Cbr \u002F>\n    \u002F\u002F both return ‘US’\u003Cbr \u002F>\n    $country = PepakIpToCountry::IP_to_Country_XXX(‘8.8.8.8’);\u003Cbr \u002F>\n    \u002F\u002F returns ‘USA’\u003Cbr \u002F>\n    $country = PepakIpToCountry::IP_to_Country_Info(‘8.8.8.8’);\u003Cbr \u002F>\n    \u002F\u002F returns Array(‘iso_name’=>’UNITED STATES’, ‘iso_code2’=>’US’, ‘iso_code3’=>’USA’)\u003Cbr \u002F>\n$image = PepakIpToCountry::IP_to_Country_Flag(‘8.8.8.8’);\u003Cbr \u002F>\n\u002F\u002F returns ”\u003C\u002Fp>\n\u003Cp>You may leave the IP address empty; in that case, IP address of currently\u003Cbr \u002F>\nactive user is used instead.\u003C\u002Fp>\n\u003Cp>Note: All requests are cached, so there shouldn’t be a noticeable difference\u003Cbr \u002F>\nbetween reading IP_to_Country_Info and reading all three pieces of information\u003Cbr \u002F>\nseparately using the _Full, _XX and _XXX functions.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>To interface your plugin’s tables to IP-to-Country plugin’s tables within SQL,\u003Cbr \u002F>\na function \u003Ccode>Subselect\u003C\u002Fcode> is published:\u003C\u002Fp>\n\u003Cp>$subselect = PepakIpToCountry::Subselect($ip, $countryfield);\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>$ip\u003C\u002Fcode> is a field that contains IP address in the form of one 32bit number, e.g.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Col>\n\u003Cli>If you store IP addresses in the usual form of four dot-separated\u003Cbr \u002F>\nnumbers (‘127.0.0.1’), you can use MySQL’s function INET_ATON:\u003Cbr \u002F>\n$ip = ‘INET_ATON(my_ip_address_field)’;\u003Cbr \u002F>\nIt is strongly recommended to use qualified field names (with tablename in\u003Cbr \u002F>\nfront, separated by a dot):\u003Cbr \u002F>\n$ip = ‘INET_ATON(banlist.ip_address)’;\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Cul>\n\u003Cli>\u003Ccode>$countryfield\u003C\u002Fcode> is the field you want returned. It can be one of the following:\u003Cbr \u002F>\niso_name – returns the same string as PepakIpToCountry::IP_to_Country_Full(…)\u003Cbr \u002F>\niso_code2 – returns the same string as PepakIpToCountry::IP_to_Country_XX(…)\u003Cbr \u002F>\niso_code3 – returns the same string as PepakIpToCountry::IP_to_Country_XX(…)\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Note: No checking or validation is done on either of these parameters. It is assumed\u003Cbr \u002F>\nthey are \u003Cem>field names\u003C\u002Fem>, \u003Cstrong>NOT\u003C\u002Fstrong> strings. DO NOT EVER USE VALUES THAT YOUR USERS CAN\u003Cbr \u002F>\nINFLUENCE! This is important! If you let users supply arguments to Subselect(), you\u003Cbr \u002F>\nare letting them to do whatever they like with your database!\u003C\u002Fp>\n\u003Cp>This function only works with IPv4 addresses.\u003C\u002Fp>\n\u003Cp>Example usage:\u003C\u002Fp>\n\u003Cp>if (class_exists(‘PepakIpToCountry’))\u003Cbr \u002F>\n      $field = PepakIpToCountry(“INET_ATON(b.ip_addr)”, ‘iso_code2’);\u003Cbr \u002F>\n    else\u003Cbr \u002F>\n      $field = ‘NULL’;\u003Cbr \u002F>\n    $sql = “SELECT b.*, ${field} country_code FROM ${wpdb->prefix}banlist b WHERE …”;\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Note: This plugin \u003Cem>requires\u003C\u002Fem> PHP5. If you want it to work with ZIP files\u003Cbr \u002F>\n(e.g. for updating IP-country info from the default location), your PHP\u003Cbr \u002F>\nmust have extension php_zip enabled.\u003C\u002Fp>\n","Provide a simple interface for plugin authors to determine, in which country an IP is located.",6324,60,"2014-06-24T18:21:00.000Z","3.0.5","2.8.0","",[27,28,29,30,15],"country","geolocation","invisible","ip","http:\u002F\u002Fwww.pepak.net\u002Fwordpress\u002Fip-to-country-plugin","https:\u002F\u002Fdownloads.wordpress.org\u002Fplugin\u002Fip-to-country.0.08.zip",0,null,"2026-03-15T15:16:48.613Z"]