接口地址:http://api.nanyinet.com/api/ping/api.php
返回格式:json
请求方式:get/post
请求示例:http://api.nanyinet.com/api/ping/api.php?url=baidu.com

请求参数说明:

名称 必填 类型 说明
  NanYi string 域名地址

返回参数说明:

Numeric_Addressint数字地址
OriginalString原始ping内容
PositionString服务器地址
ServeripString服务器ip
avgString平均延迟
dataarrayping结果
hostString域名/URL
maxString最大延迟
minString最小延迟
postponearray延迟
timeString当前时间

返回示例:

{"code":200,"host":"baidu.com","time":1622809454,"data":{"Serverip":"39.156.69.79","Position":"北京市北京市 移动","Numeric_Address":"664552783","postpone":{"min":"5.117","avg":"5.160","max":"5.203"},"Original":"PING 39.156.69.79 (39.156.69.79) 56(84) bytes of data.\\n64 bytes from 39.156.69.79: icmp_seq=1 ttl=251 time=5.20 ms\\n64 bytes from 39.156.69.79: icmp_seq=2 ttl=251 time=5.11 ms\\n\\n--- 39.156.69.79 ping statistics ---\\n2 packets transmitted, 2 received, 0% packet loss, time 1001ms\\nrtt min/avg/max/mdev = 5.117/5.160/5.203/0.043 ms"}}

服务级错误码参照:

  错误码 说明
  200 返回内容

PHP演示:

暂无演示代码,正在拼命添加中...