百度主动推送之php推送代码示例:
$urls = array(
'http://www.example.com/1.html',
'http://www.example.com/2.html',
);
$api = 'http://data.zz.baidu.com/urls?site=https://www.yzlcms.com&token=b3XEPDWuQXvVoE3B';
$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);
echo $result;
成功返回示例:
{
"remain":99998,
"success":2,
"not_same_site":[],
"not_valid":[]
}
您已成功复制微信号
leishi010
打开微信添加好友?
确定