PHP超级Ping API接口 源码

韩小韩
2019-03-07 / 0 评论 / 3,096 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2019年03月07日,已超过1883天没有更新,若内容或图片失效,请留言反馈。

返回值演示:

{
  "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;
?>
2

评论 (0)

取消