I need to organize the website recently, and I need to detect which pages in the website are not indexed by Baidu search engine and make relevant adjustments. Since I couldn’t see it clearly by using the site command one by one, I thought of using the PHP program to batch process it. After some research, I found that it is actually very simple. Here is the author’s implementation of using PHP to detect whether a page has been included in Baidu. Share the function.
The following is the specific code:
The meaning is very simple. For example, if you need to check whether the URL http://www.phpernote.com/javascript-function/833.html is included, you only need:
checkBaiduInclude('http://www.phpernote.com/javascript-function/833.html'); Check it out for yourself.
This article is reproduced from: PHP Programmer’s Notes