php获取bing每日图片
简单的做了一个php的
简单的做了一个php的
<?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 分页类
- 下一篇:Golang写了一个帮助调试的代理程序,PHP实现了一
精彩图集
精彩文章