Distoon百度主动推动设置方法

Distoon百度主动推动设置方法

开始:先决定你要推送的模块,我是以资源讯息为例,由于资源讯息作品消息多,积极推送有长处。到Module目次下的article下的article.class.php, 搜索check 不妨看到这个因变量是考查经过供给消息的,在getone的下一条龙介入: $urls = array( $item['linkurl'] ); $api = 'http://data.zz.baidu.com/urls?site=www.896198.com&token=这行替代百度站长平台获得的token'; $ch = curl_init(); $options = array( CURLOPT_URL => $api, 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);