网站链接提交到 百度熊掌号 天级收录

//提交网站链接到百度熊掌号,更利于百度收录排名 baidu_xiongzhang_submit('baidu_xiongzhang_url','https://www.monxin.com');
function baidu_xiongzhang_submit($baidu_url,$url){
    $urls = array($url);
    $ch = curl_init();
    $options =  array(
        CURLOPT_URL => $baidu_url,
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POSTFIELDS => implode("\n", $urls),
        CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
    );
    curl_setopt_array($ch, $options);
    $result = curl_exec($ch); 
    $_POST['baidu_xiongzhang_submit']=$result;
    file_put_contents('baidu_xiongzhang_submit.txt',$result);
    $result=json_decode($result,1);                                                                            
    if($result['success']>0){
     return true;}else{
     return false;}
}

 

转载于:https://www.cnblogs.com/monxin/p/10420168.html

你可能感兴趣的:(网站链接提交到 百度熊掌号 天级收录)