PHP超级Ping API接口 源码


返回值演示:

{
  "code": "200",
  "host": "192.168.1.1",
  "ip": "192.168.1.1",
  "location": "局域网 对方和您在同一内部网",
  "ping_time_min": " 0.371ms",
  "ping_time_avg": "0.381ms",
  "ping_time_max": "0.392ms"
}

API源码:

<?php
/**
*域名/IP Ping
*2019-03-07
*NiceHanBlog
*https://www.vvhan.com/pingapi.html
*/
header("Content-Type:text/html;charset=UTF-8");
$url = $_GET['url'];
$result = file_get_contents("http://api.vvhan.com/ping?host=".$url);
echo $result;
?>

声明:⎛⎝韩小韩博客⎠⎞|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - PHP超级Ping API接口 源码


离群索居 不是野兽便是神灵