PHPackages                             thefunpower/get\_geo\_by\_ip - 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. thefunpower/get\_geo\_by\_ip

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

thefunpower/get\_geo\_by\_ip
============================

IP地址解析为地址

v2.1.3(2y ago)027Apache-2.0PHP

Since Dec 30Pushed 2y agoCompare

[ Source](https://github.com/thefunpower/get_geo_by_ip)[ Packagist](https://packagist.org/packages/thefunpower/get_geo_by_ip)[ RSS](/packages/thefunpower-get-geo-by-ip/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (1)Versions (6)Used By (0)

get\_geo\_by\_ip
================

[](#get_geo_by_ip)

根据IP获取城市信息

### 安装

[](#安装)

```
composer require thefunpower/get_geo_by_ip

```

### 调用

[](#调用)

```
$arr = get_geo_by_ip('116.233.91.158');
print_r($arr);

```

### 返回

[](#返回)

```
Array
(
    [title] => China
    [title_cn] => 中国
    [city] => Shanghai
    [city_cn] => 上海
    [lat] => 31.2222
    [lng] => 121.4581
    [isoCode] => CN
)

```

### GeoLite LICENSE

[](#geolite-license)

[CC Attribution-ShareAlike 4.0](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data?lang=en)

### GeoLite.mmdb

[](#geolitemmdb)

[wp-statistics/GeoLite2-City](https://github.com/wp-statistics/GeoLite2-City.git)

[P3TERX/GeoLite](https://github.com/P3TERX/GeoLite.mmdb)

### LICENSE

[](#license)

[Apache License 2.0](LICENSE)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Every ~83 days

Total

5

Last Release

895d ago

Major Versions

v1.0.1 → v2.1.02023-02-17

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

php

### Embed Badge

![Health badge](/badges/thefunpower-get-geo-by-ip/health.svg)

```
[![Health](https://phpackages.com/badges/thefunpower-get-geo-by-ip/health.svg)](https://phpackages.com/packages/thefunpower-get-geo-by-ip)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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