Hongmu Notes
Home Summary of pitfalls Empire website url Baidu api push code
Summary of pitfalls

Empire website url Baidu api push code

Empire website url Baidu api push code

The Baidu push code of Empire CMS is for your own use. If you don’t know how to use it, don’t try it casually. You need to modify the URL, modify the data table, and modify the Baidu API key.

<?php
define('EmpireCMSAdmin','1');
require("e/class/connect.php");
require("e/class/db_sql.php");
require("e/class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$editor=1;

$num=$empire->num("select id from phome_表");
$randnum=1000;
$randids='';
$randdh='';
for($i=1;$i<=$randnum;$i++)
{
$randids.=$randdh.rand(1,$num);
$randdh=',';
}
$sql=$empire->query("select title,id from phome_表 where id in ($randids)  limit $randnum");
while($s=$empire->fetch($sql)){
    $urls[] = 'https://www.4s5.cn/geci/'.$s['id'].'.html';//组合url
    
}

print_r($urls);
$api = 'http://data.zz.baidu.com/urls?site=https://www.4s5.cn&token=密钥';
$ch = curl_init();
$options =  array(
    CURLOPT_URL => $api,
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS => implode("\n", $urls),
    CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
echo $result;
微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

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

Author homepage View home page →

Related articles

Browser caching increases the speed of secondary visits to your website

Browser caching increases the speed of secondary visits to your website Summary of pitfalls

Use browser caching of official words: If users will visit your website multiple times, browser caching of static resources can save users time. Cache headers should be applied to all cacheable static resources, not just to a small subset of static resources (for example, images). Cacheable resources include JS and CSS files, image files, and other binary object files (media files, PDF files, etc.). Normally, HTML doesn’t…
👁 202

Recommended reading

Empire CMS News Info Media Report Profile Collection Blue Responsive Crisp template 055

Empire CMS News Info Media Report Profile Collection Blue Responsive Crisp template 055 Practical Collection empire template

I imitated it once before and then again. The template for the second imitation used the new version of Empire CMS as its core. The whole site design is high-end and simple, and the SEO is reasonable! Suitable for personal blogs, information, articles, adaptive mobile phones and other tablet devices! All modifications are managed in the background! Easy and fast! Preview image decompression password 🔒 Hidden content: View after commenting If there is no password prompt on the download page, the default password is: www.4s5.cn
👁 436
(PC + WAP) Blue Machinery & Equipment Website Template; Water Pump Industry Website Source Code Download – 1077

(PC + WAP) Blue Machinery & Equipment Website Template; Water Pump Industry Website Source Code Download – 1077 Practical Collection pbootcms Template

A blue mechanical equipment and water pump industry PbootCMS website template, compatible with both PC and WAP devices. The professional industrial design is ideal for showcasing water pump products, technical specifications, and industrial applications. It helps pump manufacturing enterprises demonstrate their product capabilities online and attract industrial customers. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn...
👁 48
(PC+WAP) High-Pressure清洗 Machine Website Template – Download Mechanical Equipment Website Source Code (1078)

(PC+WAP) High-Pressure清洗 Machine Website Template – Download Mechanical Equipment Website Source Code (1078) Practical Collection pbootcms Template

A high-pressure washer and industrial machinery website template compatible with both PC and WAP devices. The professional and practical design is ideal for showcasing high-pressure washer products and their industrial applications. This template helps cleaning equipment manufacturers showcase their products online and attract both industrial and commercial clients. Template Overview | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn | Related Articles...
👁 59
(Adaptive mobile version) Precision Instrument Website Template – Download Source Code for Instrumentation Websites – 1079

(Adaptive mobile version) Precision Instrument Website Template – Download Source Code for Instrumentation Websites – 1079 Practical Collection pbootcms Template

A PbootCMS website template for precision instrumentation and measuring equipment, compatible with both PC and WAP devices. The professional and sophisticated design is ideal for showcasing precision instrument products and demonstrating technical expertise. It helps instrumentation companies present their products online and attract both research and industrial clients. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn...
👁 51
Resource website typecho001 template

Resource website typecho001 template Program Notes Typecho

typecho001 template template please do not modify the folder name of this template. The folder name is: typecho001 1.4 Fix the js output problem on the article page 1.3 Fix the error prompt when the plug-in is not installed Optimize the list page code output 1.2 Fix the comment function and add a custom homepage title 1.1 Fix the comment reply asymmetry function Add a separate title setting function on the homepage Add the website favicon.ico icon Add one...
👁 198
A single database record for WordPress operations

A single database record for WordPress operations Program Notes wordpress

I'm documenting my code – its primary function is to handle WordPress database connections and operations. Since I might need this again in the future, I've decided to record it here; this way, when I need to use it next time, I can simply copy and paste it. As it turns out, taking notes can really save some time! First code snippet: "`php // Include the WordPress core file: require_once(dirname(__FILE__));" `
👁 173