欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php獲取bing每日壁紙示例分享

 更新時間:2014年02月25日 09:59:52   作者:  
這篇文章主要介紹了使用php獲取bing每日壁紙的示例,需要的朋友可以參考下

復(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');
 }
?>

相關(guān)文章

最新評論