接口状态
正常
总调用次数
104
添加时间
2026-01-17
更新时间
2026-02-04

请求信息

https://api.staryun.shop/API/ping.php
https://api.staryun.shop/API/ping.php

请求参数

参数名 类型 必填 说明
target string 域名
timeout string 访问域名时间
apikey string 你的key

状态码说明

状态码 说明
200 请求成功,服务器已成功处理了请求。
403 服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。
404 请求的资源未找到。请检查您的请求地址是否正确。
429 请求过于频繁。您已超出速率限制,请稍后再试。
500 服务器内部错误。服务器在执行请求时遇到了问题。

在线测试

响应结果 实时响应
// 点击"立即测试"按钮查看接口响应
// 响应将显示在此处...

调用示例

<?php
$url = 'https://api.staryun.shop/API/ping.php';
$params = [
    'target' => 'YOUR_VALUE',
    'timeout' => 'YOUR_VALUE',
    'apikey' => 'YOUR_VALUE',
];

// 构建查询字符串
$queryString = http_build_query($params);
$requestUrl = $url . ($queryString ? '?' . $queryString : '');

// 发起请求
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $requestUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);

$response = curl_exec($ch);
if ($response === false) {
    echo 'Error: ' . curl_error($ch);
} else {
    echo $response;
}

curl_close($ch);
?>
import requests

url = "https://api.staryun.shop/API/ping.php"
params = {
    "target": "YOUR_VALUE",
    "timeout": "YOUR_VALUE",
    "apikey": "YOUR_VALUE",
}

try:
    response = requests.get(url, params=params, timeout=30)
    response.raise_for_status()
    print(response.text)
except requests.exceptions.RequestException as e:
    print(f"Error: {e}")
const url = 'https://api.staryun.shop/API/ping.php';
const params = {
    'target': 'YOUR_VALUE',
    'timeout': 'YOUR_VALUE',
    'apikey': 'YOUR_VALUE',
};

// 构建查询字符串
const queryString = new URLSearchParams(params).toString();
const requestUrl = url + (queryString ? '?' + queryString : '');

// 发起请求
fetch(requestUrl)
    .then(response => {
        if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
        }
        return response.text();
    })
    .then(data => {
        console.log(data);
    })
    .catch(error => {
        console.error('Error:', error);
    });
curl "https://api.staryun.shop/API/ping.php" \
  -G --data-urlencode "target=YOUR_VALUE" \
  -G --data-urlencode "timeout=YOUR_VALUE" \
  -G --data-urlencode "apikey=YOUR_VALUE" \
  -H "Accept: application/json"