Need analogue extensions GeoIP (country detection by IP address)?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
17 views
Need the above module to determine the country by IP address in PHP.

With pleasure would take a third-party, but unfortunately immediately I would not have found due to my conditions. I would take "GeoIP", but there as I understand we need certain movements of the host, not for me. Solutions using MySQL or referral to external resources are also not suitable.

Need roughly speaking a local file ***.php (for example included with a local database in the format of CSV, XML, TXT ...), connecting to call the desired function.


Rummaging in the bins of the Internet found itself a base on maxmind.com — there is a binary format and CSV. Now began to write the script in PHP working with this database, but if someone tell me the finished script, I'd be grateful.
by | 17 views

3 Answers

0 like 0 dislike
No movements of the host do not need. Put to base yourself in the right dir, files PHP-shnye and turn them on. I've been using.
\r
\r
require_once("geoip/geoip.inc"); $gip = geoip_open("geoip/GeoIP.dat", GEOIP_STANDARD); geoip_country_name_by_addr echo($gip, $ip); geoip_close($gip); 
by
0 like 0 dislike
www.maxmind.com/app/city#api
\r
In my opinion there is a ready script on PHP for working with their local base
by
0 like 0 dislike
In PHP for this purpose use IpLoc
by

Related questions

0 like 0 dislike
6 answers
0 like 0 dislike
1 answer
asked Mar 25, 2019 by 1010101001000100110100111
110,608 questions
257,186 answers
0 comments
27,911 users