If x=USA then....

Discussion in 'Programming' started by vikaspikas, Dec 10, 2008.

  1. #1
    Hello.
    This is good website.
    I am trying to make smth like "show flag of visitors country".
    I dont know how to work with ip databases.
    But i have an idea:
    http://www.ip-adress.com/ shows visitors country name
    how should my website script look like, if want to use data from that site.

    if visitor's country in http://www.ip-adress.com/ is "USA" then www.mywebsite.com shows "USA"
    thank you
     
    vikaspikas, Dec 10, 2008 IP
  2. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #2
    It would be nice to use the website, but it will always returns the server location, not the visitor.

    Use:
    http://www.awesomephp.com/?UserInfoGeoIP

    If I remember clearly, there was this website which provided an API via the URL.

    Peace,
     
    Barti1987, Dec 10, 2008 IP
  3. harrisunderwork

    harrisunderwork Well-Known Member

    Messages:
    1,005
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    135
    #3
    You can use above script to do what u want.
     
    harrisunderwork, Dec 10, 2008 IP