belal/ip-info
最新稳定版本:v1.0.0
Composer 安装命令:
composer require belal/ip-info
包简介
Simple php package to get country from IP address
README 文档
README
usage
- Require the package using composer
composer require belal/ip-info
- To use it simply call the 'getInfo' method after intanshate an instance of the IpDataProvider class
$IpData = new IpDataProvider();
$result = $IpData->getInfo("Any Ip Address")
- The getInfo method returns a IpData opject witch can be used like:
$result->getIpInRequset()
$result->getPassedIp()
$result->getCountry()
$result->getCity()
$result->getCountryCode()
$result->getContinent()
$result->getTimeZone()
-
the getIpInRequset is the ip the request made with
-
the getPassedIp is the ip you provided
-
if they are different this mean the data is for the ip of the machine that sent the request
-
The IpData opject is JsonSerializable .. Find more at THE PHP DOCS.
统计信息
- 总下载量: 2.43k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-22