mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-13 03:49:11 +08:00
替换xiaochong0302/ip2region
This commit is contained in:
parent
bba2842967
commit
c639f89c7b
@ -124,15 +124,15 @@ function kg_object_array($object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ip to region
|
* ip地址转区域
|
||||||
*
|
*
|
||||||
* @param $ip
|
* @param $ip string
|
||||||
* @param string $dbFile
|
|
||||||
* @return array
|
* @return array
|
||||||
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
function kg_ip2region($ip, $dbFile = null)
|
function kg_ip2region($ip)
|
||||||
{
|
{
|
||||||
$searcher = new Ip2RegionSearcher($dbFile);
|
$searcher = new Ip2Region();
|
||||||
|
|
||||||
$ip2region = $searcher->btreeSearch($ip);
|
$ip2region = $searcher->btreeSearch($ip);
|
||||||
|
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
"workerman/gatewayclient": "^3.0",
|
"workerman/gatewayclient": "^3.0",
|
||||||
"whichbrowser/parser": "^2.0",
|
"whichbrowser/parser": "^2.0",
|
||||||
"hightman/xunsearch": "^1.4",
|
"hightman/xunsearch": "^1.4",
|
||||||
"xiaochong0302/ip2region": "^1.0",
|
|
||||||
"robmorgan/phinx": "^0.12",
|
"robmorgan/phinx": "^0.12",
|
||||||
"overtrue/wechat": "^4.2",
|
"overtrue/wechat": "^4.2",
|
||||||
"endroid/qr-code": "^3.9",
|
"endroid/qr-code": "^3.9",
|
||||||
"league/commonmark": "^1.5",
|
"league/commonmark": "^1.5",
|
||||||
"ezyang/htmlpurifier": "^4.14"
|
"ezyang/htmlpurifier": "^4.14",
|
||||||
|
"zoujingli/ip2region": "^2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"odan/phinx-migrations-generator": "^5.3",
|
"odan/phinx-migrations-generator": "^5.3",
|
||||||
|
105
composer.lock
generated
105
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "b5eaf9b151226966d37ce2703e2e1efc",
|
"content-hash": "a5d21272eaa0df8bfcd5a3cea6d61fad",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "bacon/bacon-qr-code",
|
"name": "bacon/bacon-qr-code",
|
||||||
@ -5255,55 +5255,6 @@
|
|||||||
],
|
],
|
||||||
"time": "2022-09-19T04:08:49+00:00"
|
"time": "2022-09-19T04:08:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "xiaochong0302/ip2region",
|
|
||||||
"version": "v1.0.2",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/xiaochong0302/ip2region.git",
|
|
||||||
"reference": "de2fbcb236cce91dfa1be2ff65516a46571b3565"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/xiaochong0302/ip2region/zipball/de2fbcb236cce91dfa1be2ff65516a46571b3565",
|
|
||||||
"reference": "de2fbcb236cce91dfa1be2ff65516a46571b3565",
|
|
||||||
"shasum": "",
|
|
||||||
"mirrors": [
|
|
||||||
{
|
|
||||||
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
|
||||||
"preferred": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=7.0"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-4": {
|
|
||||||
"Koogua\\Ip2Region\\": "src"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "xiaochong0302",
|
|
||||||
"email": "xiaochong0302@gmail.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "ip2region扩展包",
|
|
||||||
"keywords": [
|
|
||||||
"Ip2Region"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/xiaochong0302/ip2region/issues",
|
|
||||||
"source": "https://github.com/xiaochong0302/ip2region/tree/v1.0.2"
|
|
||||||
},
|
|
||||||
"time": "2022-04-27T02:45:22+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "yansongda/pay",
|
"name": "yansongda/pay",
|
||||||
"version": "v2.10.5",
|
"version": "v2.10.5",
|
||||||
@ -5432,6 +5383,58 @@
|
|||||||
"source": "https://github.com/yansongda/supports"
|
"source": "https://github.com/yansongda/supports"
|
||||||
},
|
},
|
||||||
"time": "2020-10-14T08:17:18+00:00"
|
"time": "2020-10-14T08:17:18+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "zoujingli/ip2region",
|
||||||
|
"version": "v2.0.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/zoujingli/ip2region.git",
|
||||||
|
"reference": "21ed5393a93ea62c277d91ee739b2373d60bf16d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/zoujingli/ip2region/zipball/21ed5393a93ea62c277d91ee739b2373d60bf16d",
|
||||||
|
"reference": "21ed5393a93ea62c277d91ee739b2373d60bf16d",
|
||||||
|
"shasum": "",
|
||||||
|
"mirrors": [
|
||||||
|
{
|
||||||
|
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
|
||||||
|
"preferred": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.4"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"Ip2Region.php",
|
||||||
|
"XdbSearcher.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"Apache-2.0"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Anyon",
|
||||||
|
"email": "zoujingli@qq.com",
|
||||||
|
"homepage": "https://thinkadmin.top"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Ip2Region for PHP",
|
||||||
|
"homepage": "https://github.com/zoujingli/Ip2Region",
|
||||||
|
"keywords": [
|
||||||
|
"Ip2Region"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/zoujingli/ip2region/issues",
|
||||||
|
"source": "https://github.com/zoujingli/ip2region/tree/v2.0.4"
|
||||||
|
},
|
||||||
|
"time": "2023-03-28T02:20:00+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
@ -5638,5 +5641,5 @@
|
|||||||
"ext-fileinfo": "*"
|
"ext-fileinfo": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.0.0"
|
"plugin-api-version": "2.3.0"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user