Hongmu Notes
Home Program Notes PHP script for automatically refreshing the Empire Tag page
Program Notes Empire cms

PHP script for automatically refreshing the Empire Tag page

PHP script for automatically refreshing the Empire Tag page

I wrote a PHP script to automatically access and refresh the Empire Tag page; it's not particularly useful right now, but I might use it in the future...

Upload the code to the /e/tags directory; simply access the page to view it. You may need to make appropriate modifications to the URL links within the code.

Combining this with a caching mechanism will yield excellent results.

<?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>
微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Empire CMS database statement & SQL statement format

Empire CMS database statement & SQL statement format Program Notes Empire cms

Introduction to Imperial CMS extended SQL program writing, basic examples of Imperial CMS database statements & SQL statement formats: Note: The following examples are based on placing PHP files in the system root directory. Example 1: Connect to MYSQL program. (a.php)<?php require('e/class/connect.php'); //Introduce database configuration files and public function files requ…
👁 351
Empire CMS obtains the system COOKIE variable function getcvar()

Empire CMS obtains the system COOKIE variable function getcvar() Program Notes Empire cms

Get the system COOKIE variable function syntax: getcvar($var,$ecms) Description: $var: is the variable name $ecms: 0 is to set the foreground COOKIE variable, 1 is to set the background COOKIE variable. This parameter can be omitted and defaults to 0. Usage example: getcvar('mlusername'), get the user name of the front-end login member getcvar('loginu...
👁 295
Empire CMS smart label call field collection

Empire CMS smart label call field collection Program Notes Empire cms

Collect and classify all fields that support smart tag calls into Empire CMS smart tags: [e:loop={column ID/topic ID, number of items displayed, operation type, only display pictures with titles, additional SQL conditions, display sorting}] Template code content [/e:loop] Calling time: <?=date('m-d',$bqr[newstime])?> <?=dat…
👁 3749

Recommended reading

(Adaptive Mobile Version) Responsive Electronic Information Monitoring Technology Company – PBootCMS Template 0297

(Adaptive Mobile Version) Responsive Electronic Information Monitoring Technology Company – PBootCMS Template 0297 Practical Collection pbootcms Template

This set consists of PbootCMS templates designed for adaptive, responsive mobile devices, developed by an electronic information monitoring technology company. The modern, cutting-edge design is ideal for showcasing monitoring systems, electronic information technologies, and related solutions. It enables electronic information enterprises to demonstrate their technical expertise online and attract industry clients. Template Preview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn...
👁 52
Agency Bookkeeping & Financial Registration Company Website Template – 11807 0535

Agency Bookkeeping & Financial Registration Company Website Template – 11807 0535 Practical Collection Yiyou template

This professional EyouCMS template is ideal for businesses specializing in bookkeeping services, financial consulting, and company registration. Its professional and sophisticated design effectively showcases bookkeeping services, financial advisory offerings, company registration processes, and successful case studies, helping financial and tax service providers attract corporate clients online. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS...
👁 37
(Adaptive mobile version) Health products and health product website template download 0996

(Adaptive mobile version) Health products and health product website template download 0996 Practical Collection pbootcms Template

A PbootCMS website template designed for health and wellness products, compatible with both PC and WAP devices. Its professional and health-focused design makes it ideal for health product brands to showcase their product ranges, share health-related knowledge, and tell their brand stories. This template helps health product companies attract online customers and enhance their brand image. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn...
👁 57
(Adaptive mobile version) Responsive desktop and mobile accessory website – PBootCMS template; Download source code for an HTML5 e-commerce website for digital product accessories – 0299

(Adaptive mobile version) Responsive desktop and mobile accessory website – PBootCMS template; Download source code for an HTML5 e-commerce website for digital product accessories – 0299 Practical Collection pbootcms Template

An adaptive responsive accessory and electronic product website template (PbootCMS) for both desktop and mobile devices, built using HTML5 technology. Featuring a modern, tech-driven design style, this template is ideal for showcasing mobile phone cases, computer peripherals, and other accessory products. It helps digital accessory brands attract younger consumers online. Template Preview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4...
👁 54
Brand Tea E-commerce Website Template – 11195 0536

Brand Tea E-commerce Website Template – 11195 0536 Practical Collection Yiyou template

A professional EyouCMS template designed for e-commerce platforms specializing in branded tea sales. Its modern e-commerce design seamlessly showcases tea products, brand stories, promotional campaigns, and online purchasing options. This template helps tea brands establish online e-commerce platforms and expand their sales channels. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS (E...
👁 47