PHPackages                             timeshow/ip-location - 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. timeshow/ip-location

ActiveLibrary

timeshow/ip-location
====================

ip-location for laravel

v0.2.5(4y ago)06MITPHPPHP &gt;=7.0

Since Oct 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/timeshow/ip-location)[ Packagist](https://packagist.org/packages/timeshow/ip-location)[ RSS](/packages/timeshow-ip-location/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

\#ip-location for Laravel

版本兼容性
-----

[](#版本兼容性)

LaravelPackage7.00.1.08.0last versionInstall
-------

[](#install)

Composer 安装

```
$ composer require timeshow/ip-location
```

add the `IpLocationServiceProvider` to your `config/app.php`:

```
'providers' => [
   // ...
   TimeShow\IpLocation\IpLocationServiceProvider::class,
]
```

```
'aliases' => [
   // ...
   'IpLocation' => TimeShow\IpLocation\Facades\IpLocation::class,
]
```

如何使用？
-----

[](#如何使用)

```
  use TimeShow\IpLocation\IpLocation;

  $ipLocation = new IpLocation();
  $ipLocation->getLocation('X.X.X.X');
  $ipLocation->getArea('X.X.X.X');
  $ipLocation->getCountry('X.X.X.X');
  $ipLocation->getProvince('X.X.X.X');
  $ipLocation->getCity('X.X.X.X');
  $ipLocation->getCounty('X.X.X.X');
  $ipLocation->getISP('X.X.X.X');
```

### PS Q&amp;A

[](#ps-qa)

1、返回结果出现中文乱码？

```
$ipLocation = new IpLocation();
$location = $ipLocation->getLocation('X.X.X.X');
mb_convert_encoding($location, "UTF-8", "gbk");
```

###  Health Score

19

—

LowBetter than 12% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Every ~0 days

Total

4

Last Release

1620d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a467241fe72699ff8e20c2f85fd50549eccd532ae5d58d0aced051f5f72606b?d=identicon)[timeshow](/maintainers/timeshow)

---

Top Contributors

[![timeshow](https://avatars.githubusercontent.com/u/57834562?v=4)](https://github.com/timeshow "timeshow (6 commits)")

### Embed Badge

![Health badge](/badges/timeshow-ip-location/health.svg)

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

PHPackages © 2026

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