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 #175633 is a reply to message #175630] Fri, 14 October 2011 07:31 Go to previous messageGo to previous message
Arno Welzel is currently offline  Arno Welzel
Messages: 317
Registered: October 2011
Karma:
Senior Member
justaguy, 2011-10-14 05:00:

> Hi,
>
> I wonder how we can accomplish this task?
> Say, a user from India lands at http://www.knowledgenotebook.com/download.html
> (actually it would be http://www.knowledgenotebook.com/download.php )
> I'd like to direct this visitor to http://bla.bla.bla.bla.in/download.html
>
> And if the user is from China
> it would be redirected to http://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 Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
[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 Sep 20 12:24:53 GMT 2024

Total time taken to generate the page: 0.05448 seconds