自动访问刷新帝国tag页面的PHP

写了一个自动访问刷新帝国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>
© 版权声明
THE END
喜欢就支持一下吧
点赞12
评论 抢沙发

请登录后发表评论

    暂无评论内容