1、进入DZ论坛网站目录:/source/include/post
2、找到post_newthread.php将其备份之后再打开编辑
3、查找该文件内的:showmessage($return, $returnurl
4、在这条showmessage($return, $returnurl上方添加ox_baidu_url_submit(array($tid));
5、在本文件末尾的?> 前添加以下代码

function ox_baidu_url_submit($tids){
    foreach ($tids as $key=>$value){
        $urls[] = 'http://你的域名/forum.php?mod=viewthread&tid='.$value;
    }
    $api = '你的百度收录API调用接口';
    $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);
    return $result;
}

6、保存文件
下方是修改的示例图

注意:API会在你在百度收录设置完网站后自动生成