PHP Classes

FreeGoIP: Get the location of an address with FreeGoIP API

Recommend this page to a friend!
  Info   View files Example   View files View files (66)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2022-10-21 (23 days ago) RSS 2.0 feedStarStarStarStar 78%Total: 289 This week: 9All time: 7,469 This week: 76Up
Version License PHP version Categories
freegeoip 1.0.5MIT/X Consortium ...5.3PHP 5, Web services, Geography
Description Author

This class can get the location of an address with FreeGoIP API.

It can take an IP address, a domain name or the current user IP address and sends HTTP requests to the FreeGoIP API server to retrieve the geographic location associated with that IP address including country, latitude, longitude, city, zip code and time zone.

The class can decode the response in either CSV, JSON or XML and returns it.

Picture of Ivan Melgrati
  Performance   Level  
Innovation award
Innovation award
Nominee: 3x

 

Details

FreeGoIP

GitHub license GitHub release Total Downloads GitHub issues GitHub stars

FreeGoIP - A PHP wrapper for FreeGoIP reverse geolocation API.

freegeoip.net is a service providing a public HTTP API for software developers to search the geolocation of IP addresses. It uses a database of IP addresses associated to cities along with other relevant information such as time zone, latitude and longitude.

The freegeoip web server is free and open source but the public service limit up to 10,000 queries per hour by default. Once this limit is reached, all requests from the IP will result in HTTP 403, forbidden, until the quota is cleared.

Developed by Ivan Melgrati Twitter

Requirements

  • PHP >= 5.3.0

Installation

Composer

The recommended installation method is through Composer, a dependency manager for PHP. Just add imelgrat/freegoip to your project's composer.json file:

{
    "require": {
        "imelgrat/freegoip": "*"
    }
}

More details can be found over at Packagist.

Manually

  1. Copy `src/freegoip.php` to your codebase, perhaps to the `vendor` directory.
  2. Add the `freegoip` class to your autoloader or `require` the file directly.

Feedback

Please open an issue to request a feature or submit a bug report. Or even if you just want to provide some feedback, I'd love to hear. I'm also available on Twitter as @imelgrat.

Contributing

  1. Fork it.
  2. Create your feature branch (`git checkout -b my-new-feature`).
  3. Commit your changes (`git commit -am 'Added some feature'`).
  4. Push to the branch (`git push origin my-new-feature`).
  5. Create a new Pull Request.
  Files folder image Files  
File Role Description
Files folder imagedocs (2 files, 9 directories)
Files folder imageexamples (2 files)
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpdoc.dist.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file VERSION Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:289
This week:9
All time:7,469
This week:76Up
 User Ratings  
 
 All time
Utility:100%StarStarStarStarStarStar
Consistency:91%StarStarStarStarStar
Documentation:91%StarStarStarStarStar
Examples:100%StarStarStarStarStarStar
Tests:-
Videos:-
Overall:78%StarStarStarStar
Rank:58
  

For more information send a message to info at phpclasses dot org.