Online casino oyunlarının ortalama RTP değeri %94 iken, bahsegel giriş bu oranı %97’ye kadar yükseltmiştir.

Bahis severlerin kazanç hedeflerine ulaşmasına yardımcı olan pinco profesyoneldir.

Maç sonuçlarına bahis yapmak bahsegel isteyen kullanıcılar kısmını tercih ediyor.

İnternette kazanç arayanların adresi bettilt giriş kategorileri oluyor.

Yeni dönemde daha fazla özellik getirecek olan bahsegel bekleniyor.

Bahis tutkunlarının ilk tercihi haline gelen bahsegel kalitesiyle tanınır.

WordPress纯代码给文章添加百度收录判断

利用api接口纯代码给WordPress文章添加百度收录判断

本站的api接口是https://www.520yxl.cn/api/baidu.php?domain=文章源自云轩阁-https://www.520yxl.cn/570.html

api接口文件代码如下:代码来自Weifeng's Blog文章源自云轩阁-https://www.520yxl.cn/570.html

<?php
/**
 * Baidu
 * @editer: Weifeng
 * @link: https://wfblog.net
 * @version: 1.0
 */

error_reporting(0);
header("Access-Control-Allow-Origin:*");
header('Content-type: application/json');

$domain = @$_GET['domain'];
if(!isset($domain) || empty($domain) || $domain==''){
    $data = array(
        "code" => false,
        "msg" => "未传入请求参数!"
    );
    echo json_encode($data,JSON_UNESCAPED_UNICODE);
    exit;
}
if(substr($domain, -1) == '/'){
    $domain = substr($domain,0,strlen($domain)-1);
}

$data = checkBaidu($domain);
echo json_encode($data,JSON_UNESCAPED_UNICODE);

function checkBaidu($url){
    $header = array(
        "Host:www.baidu.com",
        "Content-Type:application/x-www-form-urlencoded",//post请求
        "Connection: keep-alive",
        "Referer:https://www.baidu.com",
        "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36"
    );
    $url = 'https://www.baidu.com/s?ie=UTF-8&wd='.urlencode($url).'&usm=3&rsv_idx=2&rsv_page=1';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_HTTPHEADER, $header);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    $output = curl_exec($ch);
    curl_close($ch);
    if(strpos($output, '没有找到') || strpos($output, '很抱歉')){
        $data = array(
            "code" => 403,
            "msg" => "该域名暂时未被百度收录!"
        );
    }else{
        $number = GetBetween($output,'<span class="nums_text">百度为您找到相关结果约','个</span>');
        if(empty($number) || $number == 0){
            $number = GetBetween($output,'<b>找到相关结果数约','个</b></p>');
            if(empty($number) || $number == 0){
                $data = array(
                    "code" => false,
                    "msg" => "获取百度收录失败!"
                );
                return $data;
            }
        }
        $data = array(
            "code" => 200,
            "msg" => "该域名已被百度收录!",
            "number" => str_replace(',','',$number)
        );
    }
    return $data;
}

function GetBetween($content,$start,$end){
    $r = explode($start, $content);
    if (isset($r[1])){
        $r = explode($end, $r[1]);
        return $r[0];
    }
}
?>

使用方法

以知更鸟的Begin主题为例文章源自云轩阁-https://www.520yxl.cn/570.html

打开/wp-content/themes/begin/inc下的post-meta.php文件,在if (zm_get_option('baidu_record')) {baidu_record_t();}的下方添加下方代码,约在55行。以及在if (zm_get_option('baidu_record')) {baidu_record_b();}的下方添加下方代码,约在143行。文章源自云轩阁-https://www.520yxl.cn/570.html

  1. //文章百度收录判断
  2. $url = get_permalink();
  3. $result = file_get_contents("https://www.520yxl.cn/api/baidu.php?domain=".$url);//此处的api接口连接可以换成自己的
  4. $arr=json_decode($result,true);
  5. if ($arr['code']==200) {
  6. echo '<span class="baidu-r"><a target="_blank" title="点击查看" rel="external nofollow" href="http://www.baidu.com/s?wd='.get_the_title().'&tn=bds&cl=3&ct=2097152&si=' . $_SERVER['SERVER_NAME']. '&s=on"><i class="be be-baidu"></i>已收录</a></span>';
  7. else {
  8. echo '<span class="baidu-r"><a rel="external nofollow" title="一键提交给百度" target="_blank" href="http://zhanzhang.baidu.com/sitesubmit/index?sitename='.get_permalink().'"><i class="be be-baidu"></i>暂未收录</a></span>';
  9. }

由于知更鸟的Begin主题我开启了go链接,不想关闭,代码中有些链接自动转换成go链接。转换成go链接也不影响代码的使用,有需要的打开下面的按钮进行复制。文章源自云轩阁-https://www.520yxl.cn/570.html

可以下载下方的懒人包上传至Begin主题目录进行覆盖。文章源自云轩阁-https://www.520yxl.cn/570.html

其他主题使用方法

把下方的代码放在文章页面里就可以了,每个主题的文章页面命名不一样,你们找找看吧。文章源自云轩阁-https://www.520yxl.cn/570.html

  1. <?php
  2. //文章百度收录判断
  3. $url = get_permalink();
  4. $result = file_get_contents("https://www.520yxl.cn/api/baidu.php?domain=".$url);//此处的api接口连接可以换成自己的
  5. $arr=json_decode($result,true);
  6. if ($arr['code']==200) {
  7. echo '<span><a target="_blank" title="点击查看" rel="external nofollow" href="http://www.baidu.com/s?wd='.get_the_title().'&tn=bds&cl=3&ct=2097152&si=' . $_SERVER['SERVER_NAME']. '&s=on"></i>已收录</a></span>';
  8. else {
  9. echo '<span><a rel="external nofollow" title="一键提交给百度" target="_blank" href="http://zhanzhang.baidu.com/sitesubmit/index?sitename='.get_permalink().'">暂未收录</a></span>';
  10. } ?>

由于知更鸟的Begin主题我开启了go链接,不想关闭,代码中有些链接自动转换成go链接。转换成go链接也不影响代码的使用,有需要的打开下面的按钮进行复制。文章源自云轩阁-https://www.520yxl.cn/570.html

 文章源自云轩阁-https://www.520yxl.cn/570.html

 文章源自云轩阁-https://www.520yxl.cn/570.html

免责声明

本站提供的一切软件、教程和内容信息仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络收集整理,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。如果您喜欢该程序和内容,请支持正版,购买注册,得到更好的正版服务。我们非常重视版权问题,如有侵权请邮件与我们联系处理。敬请谅解!

陌小逸科技工作室
微信扫一扫
weinxin
mxykjgzs
公众号已复制
云轩阁V
微信扫一扫
weinxin
yunxuangeV
公众号已复制
yangxiao6
  • 本文由 yangxiao6 发表于2020年6月19日 15:59:11
  • 转载请务必保留本文链接:https://www.520yxl.cn/570.html