PHP CLASS:find the city, state/region, and country associated with an IP address

Discussion in 'PHP' started by astkboy2008, Jan 15, 2010.

  1. #1
    IPGeolocation is a PHP class which provides an easy-to-use interface to the IP Address Location XML API described at ipinfodb.com. This API allows you to find the city, state/region, and country associated with an IP address, as well as the address's approximate latitude and longitude.
    Usage:
    require_once('IPGeolocation.class.php');
    $location = new IPGeolocation($ipAddressString);
    // do some error checking here
    $strCityStateCountry = $location->getFriendlyLocation();
    
    PHP:
    this is really usefull script recently i saw many people ask how i can get the country from an ip

    use quick view tools:IPGeolocation.class.php [9.76 KB] or download:ipgeolocation-1.0.zip [3.8 KB]
     
    astkboy2008, Jan 15, 2010 IP
  2. Steve136

    Steve136 Peon

    Messages:
    240
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Steve136, Jan 15, 2010 IP
  3. astkboy2008

    astkboy2008 Peon

    Messages:
    211
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    is i should upload this extension first? or it build in
     
    astkboy2008, Jan 15, 2010 IP
  4. Steve136

    Steve136 Peon

    Messages:
    240
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It's totally different, it's not related to the first one. I was just pointing out it can be used as an alternative to the first class you posted up.

    Regards,
    Steve
     
    Steve136, Jan 15, 2010 IP
  5. astkboy2008

    astkboy2008 Peon

    Messages:
    211
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i mean is i can use it like date function is php
    or i must upload files as gd liberaly
    thanks
    me
     
    astkboy2008, Jan 15, 2010 IP