PHPackages                             belal/ip-info - 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. belal/ip-info

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

belal/ip-info
=============

Simple php package to get country from IP address

v1.0.0(3y ago)02.4k↓50%MITPHP

Since Aug 23Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Belal-2000/ip-info)[ Packagist](https://packagist.org/packages/belal/ip-info)[ RSS](/packages/belal-ip-info/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Simple php package to get country from IP address
=================================================

[](#simple-php-package-to-get-country-from-ip-address)

### usage

[](#usage)

- Require the package using composer

```
composer require belal/ip-info

```

- To use it simply call the 'getInfo' method after intanshate an instance of the IpDataProvider class

```
$IpData = new IpDataProvider();

$result = $IpData->getInfo("Any Ip Address")

```

- The getInfo method returns a IpData opject witch can be used like:

```
$result->getIpInRequset()

$result->getPassedIp()

$result->getCountry()

$result->getCity()

$result->getCountryCode()

$result->getContinent()

$result->getTimeZone()

```

- the getIpInRequset is the ip the request made with
- the getPassedIp is the ip you provided
- if they are different this mean the data is for the ip of the machine that sent the request
- The IpData opject is JsonSerializable .. Find more at [THE PHP DOCS](https://www.php.net/manual/en/jsonserializable.jsonserialize.php).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

1364d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bad39398de97962439c8709367ddf3c0740baa8f56c6d1c48fe645f9ee9f685?d=identicon)[Belal-2000](/maintainers/Belal-2000)

---

Top Contributors

[![Belal-2000](https://avatars.githubusercontent.com/u/58776528?v=4)](https://github.com/Belal-2000 "Belal-2000 (1 commits)")

### Embed Badge

![Health badge](/badges/belal-ip-info/health.svg)

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

PHPackages © 2026

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