This article is mainly for google and baidu to write a website anti-chain and indexing query,
This article is mainly for google and baidu to write a website anti-chain and indexing query,
If ($ site ){
$ Buffer = @ file_get_contents ('HTTP: // www.baidu.com/s? Wd = site % 3A '. $ site, 'R ');
If ($ buffer ){
$ BaiduSite = cut ($ buffer, 'Find webpage ', 'topic ');
$ BaiduSite = str_replace (array ('approx ',', '), '', $ BaiduSite );
}
$ Buffer = @ file_get_contents ('HTTP: // www.baidu.com/s? Wd = domain % 3A '. $ site, 'R ');
If ($ buffer ){
$ BaiduDomain = cut ($ buffer, 'Find the webpage ', 'topic ');
$ BaiduDomain = str_replace (array ('approx ',', '), '', $ BaiduDomain );
}
$ Buffer = @ file_get_contents ('HTTP: // www.google.cn/search? Q = site % 3A '. $ site, 'R ');
If ($ buffer ){
$ GoogleSite = cut ($ buffer, 'with <B>', '</B> ');
$ GoogleSite = str_replace (',', '', $ GoogleSite );
}
$ Buffer = @ file_get_contents ('HTTP: // www.google.cn/search? Q = link % 3A '. $ site, 'R ');
If ($ buffer ){
$ GoogleLink = cut ($ buffer, 'with <B>', '</B> item ');
$ GoogleLink = str_replace (',', '', $ GoogleLink );
}
}
Include MooTemplate ("site_index ");
Function cut ($ file, $ from, $ end ){
$ Message = explode ($ from, $ file );
$ Message = explode ($ end, $ message [1]);
Return $ message [0];
}