LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-12-2004, 02:07 PM   #1
wiggywag
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: Slackware 9.1
Posts: 36

Rep: Reputation: 15
Ip check script, help me?


Hi!

I need a script that can run an IP check on a multinational website, which finds out what country the person are coming from and redirect the person to the right server based upon that information. Any clue, any link???

Ex. You're from sweden but try to go to the norwegian site, but the script directs you to the swedish site!

Thanks!
 
Old 01-12-2004, 02:36 PM   #2
dave bean
Member
 
Registered: Jun 2003
Location: UK
Distribution: Slackware 9.1
Posts: 136

Rep: Reputation: 15
if you want to do this in java (and depending on how you implement it ) you could do a check to get their locale, language currency etc and then use this information to redirect them to the page.

see
http://java.sun.com/j2se/1.4.2/docs/...il/Locale.html

if a user in england has a locale in spanish then most probly they are spanish, and you can send them to spanish page

hope this helps
 
Old 01-12-2004, 03:19 PM   #3
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
The correlation of IPs and geographic location is one that is hard to find information on. Given a random IP, it may or may not be possible to find a country code for where they are. And even if you do find it, it may not be correct. I would skip the redirect and present the user with a page where they can pick which server they wish to go too.
 
Old 01-13-2004, 01:58 AM   #4
wiggywag
Member
 
Registered: Sep 2003
Location: Denmark
Distribution: Slackware 9.1
Posts: 36

Original Poster
Rep: Reputation: 15
I can see the clue about being careful about doing this. Thanks a lot!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I check to see if a script is running? slick_willie Programming 13 03-16-2007 10:18 AM
Script check Echo Kilo Programming 4 12-13-2004 03:55 AM
Script check Echo Kilo Programming 1 12-12-2004 12:55 PM
dynamic ip check script? jeru Debian 4 11-30-2004 09:48 AM
Script to check groups quack322 Programming 1 08-15-2004 03:16 AM


All times are GMT -5. The time now is 05:48 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration