How To Find ip.., address of the particular country..!!

Discussion in 'PHP' started by strgraphics, Jul 18, 2010.

  1. #1
    Dear friends..,

    i would like to display the country name in my site depending upon the country location.

    Depneding upon ip that should display the name of the country...!!!!


    So is there any script....!!! to find

    This displaying the correct ip address of the country, but how can i print the name of the country i mean with flag..!!

    $ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
    
    echo "$ip <br>"; 
    
    PHP:
     
    strgraphics, Jul 18, 2010 IP
  2. georgiivanov

    georgiivanov Member

    Messages:
    62
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    25
    #2
    georgiivanov, Jul 18, 2010 IP
  3. adamsinfo

    adamsinfo Greenhorn

    Messages:
    60
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #3
    As above, you'll need a 3rd party library/API to get this information. I personally use the GEOIP lite/free database as an apache module.
     
    adamsinfo, Jul 18, 2010 IP
  4. strgraphics

    strgraphics Active Member

    Messages:
    710
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    Thanks for the replies.
     
    strgraphics, Jul 20, 2010 IP
  5. yavonci

    yavonci Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks, i was looking for this
     
    yavonci, Sep 16, 2010 IP