<?php
$Num=rand(0,7);
$url="http://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=8";
$info=file_get_contents($url);
preg_match_all('|"url":"(.*?)"|',$info,$tp);
$tp="http://cn.bing.com".$tp[1][$Num];//$Num不能为0
$tp=str_replace('jpg&pid=hp','png',$tp);
header("location:".$tp);
?>
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交