Homeowner Loans - Online Loans - Nature's Sunshine - Bleach 151 . Bleach 152 - Online Advertising

PDA

View Full Version : Redirecting based on the visitor's country


Seqqa
May 9th 2008, 3:01 pm
Hello Everyone,

I would like to send my visitors to different pages on my website I would like to send USA IP's to say for example page_1.htm and IP's from everywhere else to page_2.htm

Just wanted to know if there was a PHP code out there that would do the job, green rep for anybody that posts a code that works.

jayshah
May 9th 2008, 3:04 pm
Use the DB from MaxMind .. it's easy to implement, they provide sample code too (all free).

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

Jay

Alexj17
May 9th 2008, 6:16 pm
Just wanted to know if there was a PHP code out there that would do the job, green rep for anybody that posts a code that works.

Its not just as simple as PHP code, to do the job more efficiently a database is required.

jayshah
May 10th 2008, 2:20 am
Depending on the size of the data, the database will slow down the process. MaxMind provide a binary version of their database, which is quicker, than importing an equivalent database of it. That's also why they provide the sample PHP code.

Jay

Seqqa
May 10th 2008, 3:13 am
Its not just as simple as PHP code, to do the job more efficiently a database is required.

Right ok, and how would this all work?