Skip to content
Official PHP library for IPfinder
Branch: master
Clone or download
Latest commit e098306 Apr 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples update Apr 10, 2019
src Update IPfinder.php Apr 12, 2019
.editorconfig update Apr 10, 2019
.gitattributes
.gitignore update Apr 10, 2019
LICENSE
README.md update Apr 10, 2019
autoloader.php Manual autoloead Apr 14, 2019
changelog.md update Apr 10, 2019
composer.json Update composer.json Apr 12, 2019
phpunit.xml update Apr 10, 2019

README.md

FOSSA Status

IP Finder

IPFinder PHP Client Library

The official PHP client library for the IPFinder.io get details for :

  • IP address details (city, region, country, postal code, latitude and more ..)
  • ASN details (Organization name, registry,domain,comany_type, and more .. )
  • Firewall by supported formats details (apache_allow, nginx_deny, CIDR , and more ..)
  • IP Address Ranges by the Organization name details (list_asn, list_prefixes , and more ..)
  • service status details (queriesPerDay, queriesLeft, key_type, key_info)

Getting Started

singing up for a free account at https://ipfinder.io/auth/signup, for Free IPFinder API access token.

The free plan is limited to 4,000 requests a day, and doesn't include some of the data fields To enable all the data fields and additional request volumes see https://ipfinder.io/pricing.

Documentation

See the official documentation.

Installation

composer require ipfinder/ipfinder

Authentication


$client = new ipfinder\ipfinder\IPfinder('YOUR_TOKEN_GOES_HERE');

// lookup your IP address information
$details = $client->Authentication();

var_dump($details);

Get IP address

$client = new ipfinder\ipfinder\IPfinder('YOUR_TOKEN_GOES_HERE');

// GET Get details for 1.0.0.0
$ip_address = '1.0.0.0'; 

// lookup IP address information

$details = $client->getAddressInfo($ip_address);

var_dump($details);

Get ASN

This API available as part of our Pro and enterprise https://ipfinder.io/pricing.

$client = new ipfinder\ipfinder\IPfinder('YOUR_TOKEN_GOES_HERE');

$asn = 'as36947';

// lookup Asn information
$details = $client->getAsn($asn);

var_dump($details);


// get and print continent name  
echo $details->continent_name."\n"; 

// get and print speed
echo $details->speed['ping']."\n"; 

Firewall

This API available as part of our enterprise https://ipfinder.io/pricing. formats supported are : apache_allow, apache_deny,nginx_allow,nginx_deny, CIDR, linux_iptables, netmask, inverse_netmask, web_config_allow , web_config_deny, cisco_acl, peer_guardian_2, network_object, cisco_bit_bucket, juniper_junos, microtik

$client = new ipfinder\ipfinder\IPfinder('YOUR_TOKEN_GOES_HERE');

$asn = 'as36947';

// lookup Asn information
$details = $client->getFirewall($asn,'nginx_deny');

var_dump($details);

Get IP Address Ranges

This API available as part of our enterprise https://ipfinder.io/pricing.

Make sure to convert Organization name into URL encoding

$client = new ipfinder\ipfinder\IPfinder('YOUR_TOKEN_GOES_HERE');

// Organization name
$org = 'Telecom Algeria';

// lookup Organization information
$details = $client->getRanges($org);

var_dump($client);

// print Organization name url encode  
echo $client->urlencode;

Get service status

$client = new ipfinder\ipfinder\IPfinder('YOUR_TOKEN_GOES_HERE');

// lookup IP TOKEN information

$details = $client->getStatus();

var_dump($details);

// get and print Number of IP address queries left for the day
echo $details->queriesLeft."\n"; 

Add proxy

$client = new ipfinder\ipfinder\IPfinder('YOUR_TOKEN_GOES_HERE', 'https://ipfinder.yourdomain.com');

Contact

Contact Us With Additional Questions About Our API, if you would like more information about our API that isn’t available in our IP geolocation API developer documentation, simply contact us at any time and we’ll be able to help you find what you need.

License

MIT

You can’t perform that action at this time.