Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #3414
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: How to redirect user based on user country? |
| Date | 2011-10-14 05:53 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <j790ra$5mk$1@dont-email.me> (permalink) |
| References | <92d71fb7-3888-4f1f-a64b-7eae67ac0025@q4g2000yqh.googlegroups.com> |
On 10/13/2011 11:00 PM, justaguy wrote: > 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? > > Though another approach is also doable, messy. > Download mirror site in India > Download mirror site in China > ... > > Thanks. > > You can't do it reliably. You can only go by the user's ip address using one of the geoip databases around. But these databases have limited accuracy. They depend on the user's ip address being in the same country as the user (which may or may not be correct, especially for dial-up users and those using a proxy). Additionally, they depend on an ISP not allocating ip addresses across multiple countries. Additionally, just because a server is in the same country doesn't mean it's necessarily the best server to use. There are many reasons a server in another country would be better. A better way is to display a list of servers and let the user choose. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
How to redirect user based on user country? justaguy <lichunshen84@gmail.com> - 2011-10-13 20:00 -0700
Re: How to redirect user based on user country? Arno Welzel <usenet@arnowelzel.de> - 2011-10-14 09:31 +0200
Re: How to redirect user based on user country? justaguy <lichunshen84@gmail.com> - 2011-10-14 02:42 -0700
Re: How to redirect user based on user country? The Natural Philosopher <tnp@invalid.invalid> - 2011-10-14 12:18 +0100
Re: How to redirect user based on user country? houghi <houghi@houghi.org.invalid> - 2011-10-14 19:09 +0200
Re: How to redirect user based on user country? justaguy <lichunshen84@gmail.com> - 2011-10-15 08:25 -0700
Re: How to redirect user based on user country? Jerry Stuckle <jstucklex@attglobal.net> - 2011-10-14 05:53 -0400
csiph-web