<?
extract($_GET);extract($_POST);
$url="http://xxxxxxx.com/chuanqi.php";
if(!$file){ $file="index.html";$url="http://xxxxxxxxxxxx.com/chuanqi.php"; }
/*自己加判断这个$url的语句,来赋予 $file不同的名字-----------》生成不同的html名字
比如:
if($file="wow.html"){
//$file是在人们访问html页面时由iframe传递过来的
$url="http://xxxxxx/wow.php" //相应的动态页面
}
*/
$path=$file;
$cache_filetime = filemtime($path);
if (time() - $cache_filetime <= 72000) {
//** the cache is not expire
echo "还没有必要更新";
}else{
[email protected]($url,"r") or die("timeout");//判断网页能否打开
$fcontents = file_get_contents($url);
$handle=fopen($path,'w'); //写入方式打开路径
fwrite($handle,$fcontents); //把刚才替换的内容写进生成的HTML文件
fclose($handle);
echo "done";
}
?>
本网刊登的文章均仅代表作者个人观点,并不代表本网立场。文中的论述和观点,敬请读者注意判断。
本文地址:http://www.xlkjgs.com/notes/html/2093.html