PHP头条
热点:

php获取bing每日壁纸示例分享


代码如下:
$str=file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1');
if(preg_match("/(.+?)<\/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');
}
?>

www.phpzy.comtrue/php/19945.htmlTechArticlephp获取bing每日壁纸示例分享 代码如下: $str=file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0 if(preg_match("/ (.+?) /ies",$str,$matches)){ $imgurl='http://cn.bing.com'.$matches[1]; } if($imgurl){ header('Content-...

相关文章

PHP之友评论

今天推荐