Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ip country php or apache [closed]

Tags:

php

apache

i want to validate if the user enter his correct information (city, region, country) from my registration form.

i want to use maxmind because its free and 99.5% accurate (which is good enough for me)

now i read there's a php version and a apache version

http://www.maxmind.com/app/mod_geoip

http://www.maxmind.com/app/php

which one is better to use? thanks

like image 467
ana Avatar asked Dec 04 '11 13:12

ana


1 Answers

The Apache version does the lookup and puts the values into two environment variables. This means it'll do it for every request, plus you will need to take the values from the variables and use them somehow.

The PHP version does the lookup when you call it, i.e. you only need do it during the registration process, plus if you are writing the site with PHP you are half way there already.

I'd recommend using the PHP version.

like image 107
Stephen Turner Avatar answered Oct 14 '22 22:10

Stephen Turner