2017 © Pedro Peláez
 

library ipfind-php

PHP Library to fetch location information from an IP Address

image

tenfef/ipfind-php

PHP Library to fetch location information from an IP Address

  • Sunday, November 6, 2016
  • by tenfef
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

IPFind-PHP

A simple class for getting a users location from their IP Address. The class uses IP Find - IP Geolocation API as the backend API for this service., (*1)

Installation

Install the latest version with, (*2)

$ composer require tenfef/ipfind-php

Basic Usage

<?php

use Tenfef\IPFind\IPFind;

$apiKey = "YOUR_API_KEY_HERE"; // get an API key from https://ipfind.co or pass in NULL if you plan on using < 100/day
$ipfind = new IPFind($apiKey);
$result = $ipfind->fetchIPAddress('8.8.8.8');
var_dump($result);

/*
object(stdClass)#2 (14) {
  ["ip_address"]=>
  string(7) "8.8.8.8"
  ["country"]=>
  string(13) "United States"
  ["country_code"]=>
  string(2) "US"
  ["continent"]=>
  string(13) "North America"
  ["continent_code"]=>
  string(2) "NA"
  ["city"]=>
  string(13) "Mountain View"
  ["county"]=>
  string(11) "Santa Clara/
  ["region"]=>
  string(10) "California"
  ["region_code"]=>
  string(2) "CA"
  ["timezone"]=>
  string(3) "PST"
  ["owner"]=>
  string(26) "LEVEL 3 COMMUNICATIONS INC"
  ["longitude"]=>
  float(-122.0865)
  ["latitude"]=>
  float(37.3801)
  ["warning"]=>
  string(131) "You are not using an IP Find API Key. You are limited to 100 requests/day. Register for free at https://ipfind.co for higher limits"
}
*/

Documentation

License

IP Find is licensed under the MIT License, (*3)

The Versions

06/11 2016

dev-master

9999999-dev

PHP Library to fetch location information from an IP Address

  Sources   Download

MIT

ip find ipfind ip address lookup ip address geolocation ip address reverse lookup api

05/11 2016

1.0.1

1.0.1.0

PHP Library to fetch location information from an IP Address

  Sources   Download

MIT

ip find ipfind ip address lookup ip address geolocation ip address reverse lookup api

05/11 2016

1.0.0

1.0.0.0

PHP Library to fetch location information from an IP Address

  Sources   Download

MIT

ip find ipfind ip address lookup ip address geolocation ip address reverse lookup api