FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How to redirect user based on user country?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How to redirect user based on user country? [message #175641 is a reply to message #175637] Fri, 14 October 2011 11:18 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
justaguy wrote:
> On Oct 14, 3:31 am, Arno Welzel <use...@arnowelzel.de> wrote:
>> justaguy, 2011-10-14 05:00:
>>
>>> Hi,
>>> I wonder how we can accomplish this task?
>>> Say, a user from India lands athttp://www.knowledgenotebook.com/download.html
>>> (actually it would behttp://www.knowledgenotebook.com/download.php)
>>> I'd like to direct this visitor tohttp://bla.bla.bla.bla.in/download.html
>>> And if the user is from China
>>> it would be redirected tohttp://bla.bla.bla.bla.cn/download.html
>>> so and so forth.
>>> This approach would be more elegant if easily doable. If so how?
>> You can use a GeoIP database (e.g. <http://www.maxmind.com/app/php>)
>> which gives you a rough location based on the IP address of the client.
>> This doesn't make sence of course without servers actually located in
>> different countries.
>>
>> --
>> Arno Welzelhttp://arnowelzel.dehttp://de-rec-fahrrad.de
>
> All right, thanks, so, it's quite involved.

Yes.

You need to develop and probably manually maintain a database of IP
address blocks versus country.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: including CSS & JS on only pages that need that CSS & JS
Next Topic: Can I stop sending content-length header?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 22:57:36 GMT 2024

Total time taken to generate the page: 0.04098 seconds