代码拉取完成,页面将自动刷新
<?php
// gzip解压缩函数
if (!function_exists('gzdecode')) {
function gzdecode($data) {
// strip header and footer and inflate
return gzinflate(substr($data, 10, -8));
}
}
//api链接
$api_url = "http://dev.kdlapi.com/api/getproxy/?secret_id=o1fjh1re9o28876h7c08&signature=xxxxx&num=100&protocol=1&method=2&an_ha=1&sep=1";
$opts = array('http' =>
array(
'method' => 'GET',
'header' => 'Accept-Encoding: gzip', // 使用gzip压缩让数据传输更快
)
);
$context = stream_context_create($opts);
$result = file_get_contents($api_url, false, $context);
echo gzdecode($result); // 输出返回内容
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。