Status
Not open for further replies.

ziycon

New Member
I'm looking to have the functionality of when a users registers on a site that it will pick up the country based on the IP database used.

I was looking at Google gears and was unable to figure out how it worked(just having a bad day) I also found the geoip addin for PHP which requires some configuration on the web server to get it to work.

I was wondering if anyone could give me some advice as to the simplest and easiest way to get this functionality working on a site?

Thanks in advance.
 

php.allstar

New Member
If only all browsers supported Geolocation in HTML5 or HTML 5 for that matter!

Although I tried in out on Firefox anf Firefox asked my permission to give my location.
 

Redfly

New Member
I third Maxmind. We pay for API queries (Although it's getting quite expensive now @~$200 a month for a large site) but it's always up to date and works fast and well.
 

mneylon

Administrator
Staff member
I third Maxmind. We pay for API queries (Although it's getting quite expensive now @~$200 a month for a large site) but it's always up to date and works fast and well.
We sync down the data every week, so we pay a fixed cost.
Unless you're doing something that is only possible via the API you should look at the DB solution instead (it's about $25 / month I think)
 

ziycon

New Member
Got it working using the PEAR PHP module, my hosting had it easily available. I downloaded the geoip.dat database file to a local directory on my server, is this database updated regualrly?
 

mneylon

Administrator
Staff member
Got it working using the PEAR PHP module, my hosting had it easily available. I downloaded the geoip.dat database file to a local directory on my server, is this database updated regualrly?
If you have a subscription (we do) you can pull down a fresh copy every week.. I suspect it changes a few times a month, as new blocks of IPs are allocated.
Of course it will all get a lot more complicated with the rollout of IPv6 :)

(Note to self: IPv6 enable this site again.. )
 

Forbairt

Teaching / Designing / Developing
The cities data is about 130MBs .. wonder what kinda hit querying that would have (mental note do some research on costs of queries)
 
Status
Not open for further replies.
Top