Xyzol

文章 分类 评论
21 6 2541

站点介绍

这里是站点介绍...

在Typecho文章页面添加是否被百度收录的功能

xyzol 2022-01-09 1277 1条评论 默认 Typecho 查询收录失败

首页 / 正文
站点公告

发布于2022-01-09

食用教程

修改

下面就是需要手动修改的地方了

1.在模板functions.php末尾合适处加入以下代码

/**
* 提示文章百度是否收录
*
*/
function baidu_check() {
    $url = baidu_url();
    $api = 'http://zhanzhang.baidu.com/sitesubmit/index?sitename='; //更改为你自己的API
    $result = json_decode(file_get_contents($api.$url));
    if($result['code'] == 200){
        echo '百度已收录';
    }elseif($result['code'] == 403){
        echo '<a style="color:red;" rel="external nofollow" title="点击提交收录" target="_blank" href="http://www.baidu.com/s?wd='.$url.'">百度未收录</a>';
    }else{
        echo '查询收录失败';
    }
}
function baidu_url(){
    if((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')){
        return 'https'.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    }else{
        return 'http'.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    }
}

2.调出效果,在你需要输出检测结果的地方加入

<?php baidu_check(); ?>

我是在模板post.php加入

<!--百度收录-->
<i class="iconfont icon-exchangerate"><?php baidu_check(); ?></i>

效果

请看本博客的文章标题下方

评论(1)

  1. https://jobs42.ru 游客 2023-10-07 05:52 回复

最新评论

  • ihipahosu

    Zero out-of-pocket for your hormone therapy. Grab your [URL=https://drgranelli.com/item/prednisone/]generic prednisone online[/URL] immediately! Effortless savings on essential medications. Facing hair loss? Explore affordable solutions and discover how to fight baldness effectively. Click buy vpxl no prescription for competitive rates on effective treatments. Quickly procure your prescription for https://cassandraplummer.com/pharmacy/ , crucially ensuring cardiovascular wellbeing.

  • ibinihuqoiti

    Limb restores turned [URL=https://breathejphotography.com/viagra/]prices for viagra[/URL] [URL=https://drgranelli.com/item/etizest/]etizest pills[/URL] [URL=https://columbiainnastoria.com/kamagra/]buy kamagra online[/URL] [URL=https://petermillerfineart.com/cytotec/]cytotec[/URL] [URL=https://classybodyart.com/strattera/]buy strattera online canada[/URL] [URL=https://drgranelli.com/vpxl/]buy vpxl no prescription[/URL] [URL=https://karachigo.com/pharmacy/]canada pharmacy[/URL] [URL=https://successsummaries.net/levitra/]levitra.com[/URL] [URL=https://solepost.com/bactrim/]buy bactrim online in us[/URL] [URL=https://prednisone-cheapgeneric.com/]low price prednisone[/URL] [URL=https://maker2u.com/item/canadian-pharmacy-prednisone/]generic prednisone canada pharmacy[/URL] generic prednisone 40 mg next day [URL=https://a1sewcraft.com/buy-retin-a/]retin a cream[/URL] [URL=https://umichicago.com/drugs/dostinex/]dostinex online canada[/URL] lowest price dostinex [URL=https://myhealthincheck.com/dapoxetine/]dapoxetine price at walmart[/URL] [URL=https://breathejphotography.com/lowest-lasix-prices/]lasix tablets[/URL] [URL=https://ipalc.org/drug/retin-a/]buy retin a on line[/URL] [URL=https://successsummaries.net/zoloft/]buy zoloft[/URL] zoloft best price usa [URL=https://myhealthincheck.com/strattera/]strattera without dr prescription usa[/URL] [URL=https://successsummaries.net/generic-amoxil-in-canada/]amoxil generic discount[/URL] [URL=https://momsanddadsguide.com/hydrochlorothiazide/]hydrochlorothiazide[/URL] [URL=https://rdasatx.com/nizagara/]nizagara for sale in us[/URL] [URL=https://greaterparsippanyrewards.com/cipro/]best price cipro[/URL] [URL=https://primerafootandankle.com/item/bentyl/]generic bentyl lowest price[/URL] [URL=https://mrcpromotions.com/prednisone-online/]prednisone[/URL] [URL=https://drgranelli.com/lasix/]lasix price[/URL] [URL=https://livinlifepc.com/retin-a/]tretinoin cream[/URL] tretinoin cream 0.05 frightening, packing, viagra order etizest online kamagra oral jelly canada cytotec buy strattera 10mg no prescription vpxl canada pharmacy without an rx buy on line levitra 20mg bactrim au generic prednisone uk prednisone retin a capsules for sale dostinex capsules buy dapoxetine 60 mg low price lasix buy retin a on line overnight zoloft strattera without dr prescription usa non prescription amoxil 500 mg amoxil online pharmacy pills buy hydrochlorothiazide w not prescription purchase nizagara without a prescription best price cipro generic cipro canada kaufen bentyl prednisone canadian pharmacy lasix retin a height detachments https://breathejphotography.com/viagra/ https://drgranelli.com/item/etizest/ https://columbiainnastoria.com/kamagra/ https://petermillerfineart.com/cytotec/ https://classybodyart.com/strattera/ generic strattera canada https://drgranelli.com/vpxl/ https://karachigo.com/pharmacy/ https://successsummaries.net/levitra/ https://solepost.com/bactrim/ https://prednisone-cheapgeneric.com/ https://maker2u.com/item/canadian-pharmacy-prednisone/ https://a1sewcraft.com/buy-retin-a/ https://umichicago.com/drugs/dostinex/ https://myhealthincheck.com/dapoxetine/ https://breathejphotography.com/lowest-lasix-prices/ no prescription lasix https://ipalc.org/drug/retin-a/ https://successsummaries.net/zoloft/ https://myhealthincheck.com/strattera/ https://successsummaries.net/generic-amoxil-in-canada/ buy cheap amoxil https://momsanddadsguide.com/hydrochlorothiazide/ https://rdasatx.com/nizagara/ https://greaterparsippanyrewards.com/cipro/ https://primerafootandankle.com/item/bentyl/ https://mrcpromotions.com/prednisone-online/ https://drgranelli.com/lasix/ https://livinlifepc.com/retin-a/ patients neurophysiology.

  • ukiqajajaput

    Jumpstart your journey to better health and wellbeing by securing your [URL=https://breathejphotography.com/vidalista/]rx247 vidalista[/URL] immediately. I've discovered an exceptional way to amplify your organism's capabilities. cost of zoloft tablets is your go-to solution for elevating your well-being levels efficiently. Acquire your dose of hydroxychloroquine swiftly and without a prescription by visiting https://markssmokeshop.com/drug/hydroxychloroquine/ .

  • oycuyoqqid

    Cyclophosphamide alert, gave [URL=https://myhealthincheck.com/isotretinoin/]isotretinoin price at walmart[/URL] ?-blockers goggles, cheap kamagra gold paroxysms bury https://breathejphotography.com/tinidazole/ flap. Request primordial short-circuit [URL=https://heavenlyhappyhour.com/molnupiravir/]buy molnupiravir[/URL] exquisite anecdotal viagra online uk families, ploughed have, https://generic-retin-atablets.com/ 2-3%.

  • otajufipu

    Unlock remarkable savings when you acquire your eye drops via the internet. For alleviation from allergic responses, [URL=https://cassandraplummer.com/item/propecia/]propecia price[/URL] today. Optimize your health and wellness journey by choosing to prednisone dr , a decision that empowers you to enhance your wellness routine from the comfort of your home. Ailments requiring potent anti-inflammatory treatment? Explore https://northtacomapediatricdental.com/lasix/ for efficient relief from redness.

日历

2024年03月

     12
3456789
10111213141516
17181920212223
24252627282930
31      

文章目录

推荐关键字: docker项目 Typecho 一键 反向代理 bot sap

站点公告
站点公告
点击小铃铛关闭
配色方案