|
復(fù)制代碼 代碼如下:
<?php
$str=file_get_contents('http://cn.bing.com/HPImageArchive.ASPx?idx=0&n=1');
if(preg_match("/<url>(.+?)<//url>/ies",$str,$matches)){
$imgurl='http://cn.bing.com'.$matches[1];
}
if($imgurl){
header('Content-Type: image/JPEG');
@ob_end_clean();
@readfile($imgurl);
@flush(); @ob_flush();
exit();
}else{
exit('error');
}
?>
php技術(shù):php獲取bing每日壁紙示例分享,轉(zhuǎn)載需保留來源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請(qǐng)第一時(shí)間聯(lián)系我們修改或刪除,多謝。