PHPackages                             munna/iplocation - 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. munna/iplocation

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

munna/iplocation
================

Geo Location Tracking By IP address. Its providing more flexible information about any country.. Its completely free and open source.

v1.0.0(5y ago)6120MITPHP

Since Jan 12Pushed 2y ago2 watchersCompare

[ Source](https://github.com/munnaweber/IpLocation)[ Packagist](https://packagist.org/packages/munna/iplocation)[ RSS](/packages/munna-iplocation/feed)WikiDiscussions 1.0 Synced 1w ago

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

[![](https://camo.githubusercontent.com/40a43cd8a04adaa31cbb9e41c672a51f55cc1f5c602c2be63adbdfb8607f2a6a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4d756e6e6141686d65642f49704c6f636174696f6e)](https://github.com/MunnaAhmed/IpLocation/issues)[![](https://camo.githubusercontent.com/5ef30a89e24f3d09fda189b56f1d34f7c7a3eda8d2e4bcf517708a9c538849f2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4d756e6e6141686d65642f49704c6f636174696f6e)](https://github.com/MunnaAhmed/IpLocation/network/members)[![](https://camo.githubusercontent.com/bc304c439ecd6ebaa46ec1f3087c49e1882e99eea1e3497ecd4fd261302cf8e9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4d756e6e6141686d65642f49704c6f636174696f6e)](https://github.com/MunnaAhmed/IpLocation/stargazers)[![](https://camo.githubusercontent.com/760cd9d404fa16bebf0e03ff08207168620eb9285f804da4d8bd11ec1eb8cdc0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4d756e6e6141686d65642f49704c6f636174696f6e)](https://packagist.org/packages/munna/iplocation)

Ip Location Tracking
====================

[](#ip-location-tracking)

Tracking location info by ip address.

Installing IpLocaiton
---------------------

[](#installing-iplocaiton)

Next, run the Composer command to install the latest stable version:

```
composer require munna/iplocation
```

Create A Class Instance
-----------------------

[](#create-a-class-instance)

to create a class instance

```
// Use this as namespace
use Munna\IpLocation\IpLocation;

// Set Your Ip Address
$ip = "YOUR_IP_ADDRESS";

//this is optional. Find this api key by visiting https://ipinfo.io/account/home?service=google&loginState=create
$api_key = "API_TOKEN";

//If you have this api_key
$location = new IpLocation($ip, $api_key);

// If you do not have this api_key pass only ip
$location = new IpLocation($ip);

// Finally init the class
$location->init();
```

After init class instance. You will be get the all of these data.

Provided Data
-------------

[](#provided-data)

```
// Get Ip Address
$ip = $location->ip;

//full info as an array
$info = $location->info();

// get region name
$region = $location->region;

// get country
$country = $location->country;

// get city name If you set api_key when create instance
$cityName = $location->city;

// get ioc name
$loc = $location->loc;

// get postal
$postal = $location->postal;

// get flag url
$flag = $location->flag;

// get timeZone
$timeZone = $location->timeZone;
```

JSON data sample For All Info
-----------------------------

[](#json-data-sample-for-all-info)

```
{
    "ip": "27.147.201.241",
    "hostname": "dhknat-27.147.201.241.link3.net",
    "city": "Dhaka",
    "country": "BD",
    "region": "Dhaka",
    "loc": "23.7104,90.4074",
    "postal": "1000",
    "org": "AS23688 Link3 Technologies Ltd.",
    "flag": "https://raw.githubusercontent.com/MunnaAhmed/Flags/main/bd.png"
}
```

License
-------

[](#license)

This package is open-sources and licensed under the [MIT license](https://opensource.org/licenses/MIT).

Thank you very much. Please give a star.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~1005 days

Total

2

Last Release

914d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/94953474?v=4)[MunnaAhmed](/maintainers/MunnaAhmed)[@munnaahmed](https://github.com/munnaahmed)

---

Top Contributors

[![dev-munna](https://avatars.githubusercontent.com/u/56052563?v=4)](https://github.com/dev-munna "dev-munna (11 commits)")[![munnaweber](https://avatars.githubusercontent.com/u/36112694?v=4)](https://github.com/munnaweber "munnaweber (1 commits)")

---

Tags

iplocationLocationByIpPhpIpLocation

### Embed Badge

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

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

PHPackages © 2026

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