Script to Detect if Users are from US or Foreign?

Discussion in 'Programming' started by airraid81, May 16, 2008.

  1. #1
    I have some products that are American only that I want to promote, so I need to send foreign visitors (about 50% of my visitors) to alternate landing pages. Is there any script or something that can detect that then send people to the right pages?
     
    airraid81, May 16, 2008 IP
  2. King Goilio

    King Goilio Member

    Messages:
    200
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    33
    #2
    Have a look at this:
    wwwDOTmaxmindDOTcom/app/javascript_city

    Replace DOT with . i cant post links yet.

    If you want I can do the script for you.

    Done Script:
    cyberstuffDOTinfo/cdemo/
     
    King Goilio, May 16, 2008 IP
  3. allaboutgeo

    allaboutgeo Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can use maxmind API to determine this.
     
    allaboutgeo, May 17, 2008 IP
  4. airraid81

    airraid81 Active Member

    Messages:
    689
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Well both of these will tell which country someone is from, but what do I need to send them to different pages based on country?
     
    airraid81, May 17, 2008 IP
  5. it career

    it career Notable Member

    Messages:
    3,562
    Likes Received:
    155
    Best Answers:
    0
    Trophy Points:
    270
    #5
    Yes you can use php to redirect based on the country, not that difficult.
     
    it career, May 17, 2008 IP
  6. allaboutgeo

    allaboutgeo Peon

    Messages:
    85
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    PHP's header() function will do this for you.
     
    allaboutgeo, May 18, 2008 IP
  7. King Goilio

    King Goilio Member

    Messages:
    200
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    33
    #7
    thats what my demo dose
    I can give you the code if you want
     
    King Goilio, May 18, 2008 IP