PHPackages                             ipfinder/ipfinder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ipfinder/ipfinder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ipfinder/ipfinder
=================

official PHP library for IPfinder

v1.0.2(7y ago)67952[1 issues](https://github.com/ipfinder-io/ip-finder-php/issues)1Apache-2.0PHPPHP ^7.0

Since Apr 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ipfinder-io/ip-finder-php)[ Packagist](https://packagist.org/packages/ipfinder/ipfinder)[ Docs](https://ipfinder.io/)[ RSS](/packages/ipfinder-ipfinder/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (2)Versions (4)Used By (1)

[![FOSSA Status](https://camo.githubusercontent.com/8c93670071ca54ea7341e642da898395901f17e4d140611de48e650b0eebae2f/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246697066696e6465722d696f2532467068702e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2Fipfinder-io%2Fphp?ref=badge_shield)

[![IP Finder](https://camo.githubusercontent.com/46886c3e689a0d4a3f6c0733d1cab5d9f9a3926d/68747470733a2f2f697066696e6465722e696f2f6173736574732f696d616765732f6c6f676f732f6c6f676f2e706e67)](https://ipfinder.io/)
==================================================================================================================================================================================================================

[](#)

IPFinder PHP Client Library
===========================

[](#ipfinder-php-client-library)

[![PHP version](https://camo.githubusercontent.com/8a39866efb484157f7ade9cb75bc36c0cb75d43d86743d3679b9105037f01e38/68747470733a2f2f62616467652e667572792e696f2f70682f697066696e646572253246697066696e6465722e737667)](https://badge.fury.io/ph/ipfinder%2Fipfinder)

The official PHP client library for the [IPFinder.io](https://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)
- Get Domain IP (asn, organization,country\_code ....)
- Get Domain IP history (total\_ip, list\_ip,organization,asn ....)
- Get list Domain By ASN, Country,Ranges (select\_by , total\_domain , list\_domain ....)

Getting Started
---------------

[](#getting-started)

singup for a free account at , 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 .

Documentation
-------------

[](#documentation)

See the [official documentation](https://ipfinder.io/docs).

Installation
------------

[](#installation)

```
composer require ipfinder/ipfinder
```

Authentication
--------------

[](#authentication)

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

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

var_dump($details);
```

Get IP address
--------------

[](#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
-------

[](#get-asn)

This API available as part of our Pro and enterprise .

```
$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
--------

[](#firewall)

This API available as part of our enterprise . 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
---------------------

[](#get-ip-address-ranges)

This API available as part of our enterprise .

> 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
------------------

[](#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";
```

Get Domain IP
-------------

[](#get-domain-ip)

```
use ipfinder\ipfinder\IPfinder;

// Token
$client = new IPfinder('YOUR_TOKEN_GOES_HERE');

// domain name
$name = 'google.com';

$details = $client->getDomain($name);

var_dump($details);
```

Get Domain IP history
---------------------

[](#get-domain-ip-history)

```
use ipfinder\ipfinder\IPfinder;

// Token
$client = new IPfinder('YOUR_TOKEN_GOES_HERE');

// domain name
$name = 'google.com';

$details = $client->getDomainHistory($name);

var_dump($details);
```

Get list Domain By ASN, Country,Ranges
--------------------------------------

[](#get-list-domain-by-asn-countryranges)

```
use ipfinder\ipfinder\IPfinder;

// Token
$client = new IPfinder('YOUR_TOKEN_GOES_HERE');

// list live domain by country DZ,US,TN,FR,MA
$by = 'DZ';

$details = $client->getDomainBy($by);

var_dump($details);
```

Add proxy
---------

[](#add-proxy)

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

Error handling
--------------

[](#error-handling)

```
$client = new IPfinder('YOUR_TOKEN_GOES_HERE');
try {
$by = 'DZ';

$details = $client->getDomainBy($by);

} catch (IPfinderException $e) {

print $e->getMessage();

}
```

Contact
-------

[](#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](https://ipfinder.io/contact) us at any time and we’ll be able to help you find what you need.

License
-------

[](#license)

[![GitHub license](https://camo.githubusercontent.com/c8e633e17b9fe2abb606784334f8fa7b9ed5423e15cd37ac2b088af2ea502e3b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f697066696e6465722d696f2f69702d66696e6465722d7068702e737667)](https://github.com/ipfinder-io/ip-finder-php)

[![](https://camo.githubusercontent.com/efca18064e8a2ff4dab537a6575d329a9655887b69dc65bf304d2c42a9cf41db/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d253246697066696e6465722d696f2532467068702e7376673f747970653d6c61726765)](https://app.fossa.com/projects/git%2Bgithub.com%2Fipfinder-io%2Fphp?ref=badge_large)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~34 days

Total

3

Last Release

2565d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/db4d82e2ed499d8612455b6287c8d40497879e02b27319a677ce9d4e7c0dd885?d=identicon)[benemohamed](/maintainers/benemohamed)

---

Top Contributors

[![benemohamed](https://avatars.githubusercontent.com/u/49129795?v=4)](https://github.com/benemohamed "benemohamed (5 commits)")[![ipfinder](https://avatars.githubusercontent.com/u/48250326?v=4)](https://github.com/ipfinder "ipfinder (1 commits)")

---

Tags

apigeolocationasncountryfirewallgeoipip-locationip-location-lookupipfinderipv4ipv6maxmindphprangeipv6ipv4asnipfinder

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ipfinder-ipfinder/health.svg)

```
[![Health](https://phpackages.com/badges/ipfinder-ipfinder/health.svg)](https://phpackages.com/packages/ipfinder-ipfinder)
```

###  Alternatives

[zoujingli/ip2region

ip2region v3.0 for PHP - 企业级 IP 地理位置查询库，支持 IPv4 和 IPv6，多种缓存策略，零依赖，开箱即用

1.4k462.5k65](/packages/zoujingli-ip2region)[mlocati/ip-lib

Handle IPv4, IPv6 addresses and ranges

3127.0M59](/packages/mlocati-ip-lib)[s1lentium/iptools

PHP Library for manipulating network addresses (IPv4 and IPv6)

2316.5M27](/packages/s1lentium-iptools)[rlanvin/php-ip

IPv4/IPv6 manipulation library for PHP

179782.2k12](/packages/rlanvin-php-ip)[longman/ip-tools

PHP IP Tools for manipulation with IPv4 and IPv6

147253.5k7](/packages/longman-ip-tools)[jalle19/php-whitelist-check

Provides a simple way to check whether an address or domain is on a whitelist

41790.9k4](/packages/jalle19-php-whitelist-check)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
