ping检测

在线
ping检测
GET 返回格式 JSON
请求参数
以下是该接口支持的所有请求参数
参数名类型必填说明
target string 必填 你的域名
count string 选填 30
size string 选填 128
traceroute string 选填 true
port_check string 选填 true
响应示例
JSON 成功响应
{ "code": 200, "status": "success", "request": { "target": "mini1.cn", "resolved_ip": "43.174.225.41", "port": 80, "count": 5, "timeout": 3, "timestamp": "2026-09-04 20:01:36", "execution_time_ms": 636.82 }, "dns": { "hostname": "mini1.cn", "resolved_ip": "43.174.225.41", "resolve_time_ms": 119.88 }, "ping": { "success": true, "packets": { "sent": 5, "received": 5, "lost": 0, "loss_rate": "0%" }, "latency": { "min": 3, "max": 3.46, "avg": 3.17, "unit": "ms", "all_times": [ 3.46, 3, 3.12, 3.15, 3.13 ] } }, "quality": { "score": 100, "grade": "A", "issues": [], "recommendations": [ "网络质量良好" ] }, "system": { "php_version": "8.2.33", "server_ip": "10.0.15.24", "method": "TCP 连接探测 (纯 PHP)" } }
JSON 失败响应
{ "code": 400, "error": "缺少 target 参数" }
错误码说明
常见错误码及处理建议
错误码说明处理建议
200请求成功正常处理返回数据
400参数错误检查必填参数是否完整
401未授权检查API密钥是否正确
404接口不存在检查请求路径是否正确
500服务器错误稍后重试或联系管理员
点击加载