1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Novice Query

Discussion in 'PHP' started by soccer-writer, Aug 3, 2008.

  1. #1
    Just started with PHP and needless to say, enjoying a fair bit.

    Just wanted to know the procedure of finding the city and country location if the ip-address is known. I don't want the script for after knowing how its done, i plan to try one out myself.

    Just fill me in on a standard procedure if any .

    Thanks in advance.
     
    soccer-writer, Aug 3, 2008 IP
  2. Pos1tron

    Pos1tron Peon

    Messages:
    95
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I believe it has to be done via a ip location database - I don't think it's really possible to write an algorithm to work it out...
     
    Pos1tron, Aug 3, 2008 IP
  3. soccer-writer

    soccer-writer Peon

    Messages:
    429
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Oh, ok. My bad. So its not a beginner thing after all. Thanks a lot though. I will try it sometime later.

    Thanks again !
     
    soccer-writer, Aug 3, 2008 IP
  4. ukshopping

    ukshopping Peon

    Messages:
    80
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    There is a free API for this,

    http ://api.hostip.info/get_html.php?ip=xxx.xxx.xx.xx&position=true
     
    ukshopping, Aug 3, 2008 IP