PHPackages                             shiran/easyip - 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. shiran/easyip

AbandonedArchivedLibrary

shiran/easyip
=============

Package description here.

2.0.0(7y ago)3896[1 issues](https://github.com/iymiym/EasyIp/issues)MITPHP

Since Apr 16Pushed 7y agoCompare

[ Source](https://github.com/iymiym/EasyIp)[ Packagist](https://packagist.org/packages/shiran/easyip)[ RSS](/packages/shiran-easyip/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

 easyip
========

[](#-easyip-)

 IP SDK.

[![StyleCI build status](https://camo.githubusercontent.com/6e6c8bfa64e5c8a3805ddc4331d9477f4332d38cfe696d9794c2d80684911307/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3138313636373336372f736869656c64)](https://camo.githubusercontent.com/6e6c8bfa64e5c8a3805ddc4331d9477f4332d38cfe696d9794c2d80684911307/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3138313636373336372f736869656c64)

安装
--

[](#安装)

```
$ composer require icecho/easyip -vvv
```

介绍
--

[](#介绍)

目前支持 5 家平台

- 腾讯 [Tencent](https://lbs.qq.com/webservice_v1/guide-ip.html)
- 淘宝 [Taobao](http://ip.taobao.com/)
- 百度 [Baidu](http://lbsyun.baidu.com/index.php?title=webapi/ip-api)
- 聚合 [Juhe](https://www.juhe.cn/docs/api/id/1)
- 高德 [Amap](https://lbs.amap.com/api/webservice/guide/api/ipconfig)

使用
--

[](#使用)

```
$config = [
    'provider' => 'tencent',
    'tencent' => [
        'key' => '',
    ],

    ...
    ...
    ...
];

$ip = new \Icecho\EasyIp\EasyIp($config);

$result = $ip->parse('');
```

### 在 Laravel 中使用

[](#在-laravel-中使用)

```
php artisan vendor:publish --provider="Icecho\EasyIp\ServiceProvider"
```

进入 config/easyip.php

```
return [
    'provider' => 'tencent',

    'tencent' => [
        'key' => '',
    ],

    ...
    ...
    ...
]
```

在 tinker 中测试

```
app('EasyIp')->parse('')

...
...
```

数据返回格式

```
# 如果想要 api 原生格式，在 config/easyip.php 中，把 format 改为 false

[
     "provider" => "Tencent",
     "ip" => "",
     "postcode" => 440300,
     "country" => "中国",
     "province" => "广东省",
     "city" => "深圳市",
     "district" => "南山区",
     "implode" => "中国广东省深圳市南山区",
     "location" => [
       "latitude" => 22.55329,
       "longitude" => 113.88308,
     ],
]

```

License
-------

[](#license)

MIT

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

2581d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/077741565fdeaa21553259d58da75d1dfb153ee7da8431e619d727b825ba14d9?d=identicon)[shiran](/maintainers/shiran)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[aschmelyun/cleaver

A blazing-fast static site generator using Laravel's Blade templating engine

2961.0k](/packages/aschmelyun-cleaver)

PHPackages © 2026

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