龜甲網防爆墻防爆墻金屬深拉伸餐飲設計公司防爆墻泄爆墻電子商務站A型防爆門防爆墻造型松托輥抗爆墻新型節能鍋爐搜外友鏈防爆門泄爆墻?php
//提示:10分鐘更新一次數據
$didiId = 12500;//搜外友鏈id 例如:123
$host = "www.juniorlabs.net";//host 例如:didi.seowhy.com
$url = sprintf("https://didi.seowhy.com/api/link/auto?uid=%d&host=%s",$didiId,$host);
$cacheUrl = "./didi.seowhy.com-cache.txt";
$mtime = @filemtime($cacheUrl);
if ($mtime + 600 < time()) {
$opts = array(
"http" => array(
"method" => "GET",
"timeout" => 2
),
);
$context = stream_context_create($opts);
$content = @file_get_contents($url,false, $context);
if($content != "error"){
@file_put_contents($cacheUrl, $content);
die($content);
}
}
$content = @file_get_contents($cacheUrl);
echo $content;
?>