用户工具

站点工具


api:ip2region

IP地址查询

  https://api.xlongwei.com/service/ip/region.json

请求

ip IP地址

响应

region 地理位置
country 国家
area 地区
state 省份
city 城市
isp 服务商

示例1 示例2 演示

openid=
#json=`curl -s https://api.xlongwei.com/service/ip/region.json`
json='{"country":"中国","area":"","state":"山东省","city":"青岛市","isp":"阿里云","region":"中国山东省青岛市阿里云","ip":"115.28.229.158"}'
echo "openid=$openid json=$json"
ip=`echo $json | jq '.ip'`
echo "ip=$ip"
#curl -s https://api.xlongwei.com/service/weixin/chat.json?openid=${openid}&text=ip%3D${ip}
api/ip2region.txt · 最后更改: 2020/10/30 09:17 由 admin