多节点ping
GET
无需 Key
运行中
接口简介
多节点ping接口API,支持批量检测目标地址连通性,覆盖多地域节点,返回延迟、丢包率等数据,响应迅速,数据精准,适配网络监控、稳定性测试场景。
接口地址
https://api.lolimi.cn/API/ping/a请求示例
测试访问https://api.lolimi.cn/API/ping/a?demo=baidu.com返回预览
JSON{
"target_host": "baidu.com",
"nodes": [
{
"node_location": "中国 浙江省 金华市\/电信",
"ping_info": {
"test_host": "baidu.com",
"ip": "111.63.65.247",
"location": "河北省石家庄市 移动",
"byte": "64 bytes",
"ttl": "41 (TTL)",
"min_delay": "27.5 ms",
"max_delay": "27.5 ms",
"avg_delay": "27.5 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
},
{
"node_location": "中国 湖北省 十堰市\/电信",
"ping_info": {
"test_host": "baidu.com",
"ip": "111.63.65.247",
"location": "河北省石家庄市 移动",
"byte": "64 bytes",
"ttl": "43 (TTL)",
"min_delay": "28.6 ms",
"max_delay": "28.6 ms",
"avg_delay": "28.6 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
},
{
"node_location": "中国 浙江省 杭州市\/数据中心",
"ping_info": {
"test_host": "baidu.com",
"ip": "111.63.65.103",
"location": "河北省石家庄市 移动",
"byte": "64 bytes",
"ttl": "1 (TTL)",
"min_delay": "28 ms",
"max_delay": "28 ms",
"avg_delay": "28 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
},
{
"node_location": "中国 山东省 枣庄市\/电信",
"ping_info": {
"test_host": "baidu.com",
"ip": "111.63.65.103",
"location": "河北省石家庄市 移动",
"byte": "64 bytes",
"ttl": "45 (TTL)",
"min_delay": "20.5 ms",
"max_delay": "20.5 ms",
"avg_delay": "20.5 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
},
{
"node_location": "中国 香港",
"ping_info": {
"test_host": "baidu.com",
"ip": "111.63.65.103",
"location": "河北省石家庄市 移动",
"byte": "64 bytes",
"ttl": "44 (TTL)",
"min_delay": "54.4 ms",
"max_delay": "54.4 ms",
"avg_delay": "54.4 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
},
{
"node_location": "中国 北京\/数据中心",
"ping_info": {
"test_host": "baidu.com",
"ip": "111.63.65.247",
"location": "河北省石家庄市 移动",
"byte": "64 bytes",
"ttl": "38 (TTL)",
"min_delay": "36.1 ms",
"max_delay": "36.1 ms",
"avg_delay": "36.1 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
},
{
"node_location": "中国 山东省 济南市\/电信",
"ping_info": {
"test_host": "baidu.com",
"ip": "124.237.177.164",
"location": "河北省保定市 电信",
"byte": "64 bytes",
"ttl": "41 (TTL)",
"min_delay": "25.3 ms",
"max_delay": "25.3 ms",
"avg_delay": "25.3 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
},
{
"node_location": "中国 上海市\/数据中心",
"ping_info": {
"test_host": "baidu.com",
"ip": "111.63.65.103",
"location": "河北省石家庄市 移动",
"byte": "64 bytes",
"ttl": "47 (TTL)",
"min_delay": "42 ms",
"max_delay": "42 ms",
"avg_delay": "42 ms",
"sent_packets": "1 packets",
"received_packets": "1 packets",
"packet_loss": "0%",
"msg": "ok"
}
}
],
"total_nodes": 8,
"success_nodes": 8,
"msg": "ok"
}
请求参数
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| demo | string | Required | 需要测的ip/url |
返回参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| target_host | string | 目标ping检测主机地址 |
| nodes | array | 多节点ping检测结果集合 |
| nodes[].node_location | string | 检测节点地理位置及网络运营商 |
| nodes[].ping_info | object | 对应节点的ping详细信息 |
| nodes[].ping_info.test_host | string | 实际检测的主机地址 |
| nodes[].ping_info.ip | string | 目标主机对应的IP地址 |
| nodes[].ping_info.location | string | 目标IP的地理位置及网络运营商 |
| nodes[].ping_info.byte | string | ping请求发送的数据包大小 |
| nodes[].ping_info.ttl | string | 数据包生存时间 |
| nodes[].ping_info.min_delay | string | 最小延迟时间 |
| nodes[].ping_info.max_delay | string | 最大延迟时间 |
| nodes[].ping_info.avg_delay | string | 平均延迟时间 |
| nodes[].ping_info.sent_packets | string | 发送的数据包数量 |
| nodes[].ping_info.received_packets | string | 接收的数据包数量 |
| nodes[].ping_info.packet_loss | string | 数据包丢包率 |
| nodes[].ping_info.msg | string | 对应节点ping检测结果状态描述 |
| total_nodes | int | 参与检测的总节点数量 |
| success_nodes | int | ping检测成功的节点数量 |
| msg | string | 整体多节点ping检测结果状态描述 |
参数配置
登录获取 KeyResponseWaiting...
<?php
$url = "https://api.lolimi.cn/API/ping/a";
$params = array (
'demo' => 'value',
);
$url .= '?' . http_build_query($params);
$res = file_get_contents($url);
echo $res;