emlog判断是否被百度搜索引擎收录--360和搜狗也有

  • 内容
  • 相关

使用方法首先在模板下的module.php 中添加以下代码

判断内容页是否百度收录代码

 <?php
//判断内容页是否百度收录
function baidu($url){
$url='http://www.baidu.com/s?wd='.$url;
$curl=curl_init();curl_setopt($curl,CURLOPT_URL,$url);curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);$rs=curl_exec($curl);curl_close($curl);if(!strpos($rs,'没有找到')){return 1;}else{return 0;}}

function logurl($id){$url=Url::log($id);
if(baidu($url)==1){echo "<a style=\"color:#1EA83A;\" rel=\"external nofollow\" title=\"点击查看!\" target=\"_blank\" href=\"http://www.baidu.com/s?wd=$url\">[百度已收录]</a>";
}else{echo "<a style=\"color:red;\" rel=\"external nofollow\" title=\"点击提交收录!\" target=\"_blank\" href=\"http://zhanzhang.baidu.com/sitesubmit/index?sitename=$url\">[百度未收录]</a>";}}
?>
判断内容页是否360收录代码

<?php
//判断内容页是否360收录
function haoso($url){
$url='https://www.so.com/s?a=index&q='.$url;
$curl=curl_init();curl_setopt($curl,CURLOPT_URL,$url);curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);$rs=curl_exec($curl);curl_close($curl);
if(!strpos($rs,'找不到')){
return 1;}
else{return 0;}}

function logurlhaoso($id){$url=Url::log($id);
if(haoso($url)==1){echo "<a style=\"color:#1EA83A;\" rel=\"external nofollow\" title=\"点击查看!\" target=\"_blank\" href=\"https://www.so.com/s?a=index&q=$url\">[360已收录]</a>";
}else{echo "<a style=\"color:red;\" rel=\"external nofollow\" title=\"点击提交收录!\" target=\"_blank\" href=\"http://info.so.com/site_submit.html\">[360未收录]</a>";}}
?>
判断内容页是否搜狗收录代码

<?php
//判断内容页是否搜狗收录
function sogou($url){
$url='https://www.sogou.com/sie?query='.$url;
$curl=curl_init();curl_setopt($curl,CURLOPT_URL,$url);curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);$rs=curl_exec($curl);curl_close($curl);
if(!strpos($rs,'未收录?')){
return 1;}
else{return 0;}}
function logurlsogou($id){$url=Url::log($id);
if(sogou($url)==1){echo "<a style=\"color:#1EA83A;\" rel=\"external nofollow\" title=\"点击查看!\" target=\"_blank\" href=\"https://www.sogou.com/sie?query=$url\">[搜狗已收录]</a>";
}else{echo "<a style=\"color:red;\" rel=\"external nofollow\" title=\"点击提交收录!\" target=\"_blank\" href=\"http://fankui.help.sogou.com/index.php/web/web/index/type/1?v=1&urlword=$url\">[搜狗未收录]</a>";}}
?>

以上代码放入module.php中, 调用代码:百度<?php echo logurlbaidu($logid);?> 360<?php echo logurlhaoso($logid);?> 搜狗<?php echo logurlsogou($logid);?> 以上代码同样拥有一键提交功能。



本文标签:

版权声明:若无特殊注明,本文皆为《灵曦博客》原创,转载请保留文章出处。

本文链接:emlog判断是否被百度搜索引擎收录--360和搜狗也有 - http://www.lxssy.cn/post-222.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注

评论

3条评论
  1. avatar

    HL Lv.1 回复

    I tһink everythhing posted made a great deal oof sense.
    Howeveг, think about this, supposᥱ you added a little
    informɑtion?I mean, I don't want to tell you how tto run your website, but
    suppose yoᥙ ɑdded a title that grabbeԁ a person's attention? I mean emlog判断是否被百度搜索引擎收录--360和搜狗也有 -
    灵曦博客 is a little bοring. You could look
    at Yahoo's front pwge and watch how they creatе post headlines too grab peole to click.
    You might add a video orr a pictuгe oг two to get people excited about everything've got to say.
    Just my opinion, it migɦt bring үour posts a little livelier.

    亚太地区

    1. avatar

      FJ Lv.1 回复

      I thuink that еverything said made a great deaⅼ oof sense.
      Howᥱver, consider this, suppose yоu were to write a awesomе post title?
      I am not szүing your informatiߋn isn't good., however suppose yоuu
      added something that grаbbed folҝ's attentiߋn? I mean emlog判断是否被百度搜索引擎收录--360和搜狗也有 - 灵曦博客 is kinda plain. You might glance at YaҺoo's home page
      and see how tɦey wгite article titles to grab pᥱople to click.
      You mіght try adding a ѵideo or a picture or two to get readers excited about what
      you've goot to say. In mmy opinion, it coulpd bring your posts a lіttlе bit more intereѕting.

      美国 加利福尼亚州洛杉矶QuadraNet公司数据中心

        • 去顶部
        sitemap