Php – get user’s country code

PHP

I want to use on my site a script that shows the user's country code. I know about maxmind.com's GeoIP PHP API, but I can't install the mod_geoip (not my own server)
šŸ™

Best Answer

Apache mod_geoip is an Apache module, not a PHP-specific library. There are PECL bindings for GeoIP that can be used instead of mod_geoip, but these probably also require access to your server configuration. However, there exists also a pure PHP module that can easily be inserted into an existing app (does not require either PECL bindings or mod_geoip) found here.