寫了一個自動訪問刷新帝國tag頁面的PHP,沒啥大用,但是可能以後會用......
代碼丟到/e/tags目錄下面,訪問即可,需要適當修改代碼中URL鏈接
配合上緩存功能會有很好的效果
<?php
require('../class/connect.php');
require('../class/db_sql.php');
require('../class/functions.php');
require('../class/t_functions.php');
require('../data/dbcache/class.php');
$file = "tagid.txt";
if(file_exists($file) && filectime($file) >= time() - 86400 ){
$id = file_get_contents($file);
}else{
$id = 1;
file_put_contents($file,1);
}
$link=db_connect();
$empire=new mysqlquery();
$r=$empire->fetch1("select * from {$dbtbpre}enewstags where tagid> {$id} limit 1");
if(empty($r['tagid'])){
die("刷新完畢");
}
$id = $r['tagid'];
$url="https://www.4s5.cn/tags-{$r['tagid']}-0.html";
file_put_contents($file,$id);
echo "當前刷新的網頁地址爲:" . $url;
?>
<meta http-equiv="refresh" content="0">
<iframe src="<?=$url?>" width="100%" height="300px" frameborder="0"></iframe>