Forum Moderators: coopster & phranque

Message Too Old, No Replies

Redirecting users based on country with Perl

         

lindajames

9:29 pm on Mar 14, 2003 (gmt 0)

10+ Year Member



Hi, can anyone please help me on this perl issue its driving me NUTS!

I want to detect a users country and depending on what country the user is from i want to send them to a particular page. if the country is not known or not specified in the setting, they should be taken to the default country page.

I have been running around soo many forums and no one can seem to help me, i have no knowledge on perl (just how to install a code and edit) so please can someone help me. plzzzzzzzzzzzzzzzz

your help is much appreciated.

cheers
Linda

lindajames

9:53 am on Mar 17, 2003 (gmt 0)

10+ Year Member



Hello! can any not help me on this issue? i am really in urgent need to get this working. i really appreciate anyones help.

Cheers
Linda

Josk

10:18 am on Mar 17, 2003 (gmt 0)

10+ Year Member



This topic has been discussed in the past many times... Try using the "search" page to look for it.

In essence, it can be done, but it will only be about 80% effective due to the hosting location of ISPs.

lindajames

10:36 am on Mar 17, 2003 (gmt 0)

10+ Year Member



i have used the search page but cant find anything at all on how to exactly implement such a script or where to get one from. ive just come accross people discussing it and people going nuts trying to find out just like me. but i cannot find any solution

DrDoc

11:00 am on Mar 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I recommend using some form of splash page instead, where the user can select his/her language. For example, what if someone is in Denmark, but they're only there because of business, and don't speak a word Danish?

I'm sure users will bookmark the page in their own language/for their own country. Otherwise, just provide the default page (index.html) with a menu to choose from.

lindajames

12:34 pm on Mar 17, 2003 (gmt 0)

10+ Year Member



I found an online IP to Country detection site. the url is [location.com.my...]

can we not query and fetch the details from there and what ever the result is we then send the user to the relavant defined page, and if the site doesnt respond for any reason whatsoever then we send the user to the default page?

i really appreciate the help

many thanx
linda

dive into perl

11:15 pm on Mar 18, 2003 (gmt 0)

10+ Year Member



Hi Linda,

CPAN [cpan.org] is an excellent source of pre written Perl code.

A quick search revealed lots of modules already written to perform this type of task one example being GEO::IP [search.cpan.org].

You will need to download the module of your choice and install it onto your system (or get your ISP to install the module),
and then follow the examples in the documentation.