Display Custom Content by IP address

Discussion in 'Programming' started by Golf - Guy, Dec 28, 2005.

  1. #1
    I'm trying to find out what code or script will work to serve specific content by IP address. Say you're from Denver, I want to serve Denver News to you. Any leads on some code?
     
    Golf - Guy, Dec 28, 2005 IP
  2. Golf - Guy

    Golf - Guy Peon

    Messages:
    77
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I guess I should specify this information will be coming from a database...sorry.
     
    Golf - Guy, Dec 28, 2005 IP
  3. MattBeard

    MattBeard Peon

    Messages:
    259
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    In PHP I think you need to look at $_SERVER["REMOTE_ADDR"], however I am not sure how you would get a list of IP addresses against area
     
    MattBeard, Jan 1, 2006 IP
  4. Nitin M

    Nitin M White/Gray/Black Hat

    Messages:
    640
    Likes Received:
    93
    Best Answers:
    0
    Trophy Points:
    0
  5. sufyaaan

    sufyaaan Banned

    Messages:
    218
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #5
    sufyaaan, Jan 1, 2006 IP
  6. tccoder

    tccoder Peon

    Messages:
    69
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    google for ip to country database's

    I can provide you with one if you are intrested. Feel free to pm me.
     
    tccoder, Jan 28, 2006 IP
  7. itsme

    itsme Well-Known Member

    Messages:
    1,232
    Likes Received:
    96
    Best Answers:
    0
    Trophy Points:
    180
    #7
    Or say.... you're from Google, or Yahoo, etc... :D

    Just kidding around. Don't worry, we've all tried it.
     
    itsme, Jan 30, 2006 IP
  8. mariush

    mariush Peon

    Messages:
    562
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #8
    mariush, Feb 8, 2006 IP