|
百度的主动推送 php代码示例
- <?php
- $urls = array(
- 'http://www.example.com/1.html',
- 'http://www.example.com/2.html',
- );
- $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);
- echo $result;
- ?>
复制代码
其中
<?php
$urls = array(
'http://www.example.com/1.html',
'http://www.example.com/2.html',
);
上面这2个网址 怎么替换成dz最新的帖子,让它全自动推送
我知道答案
回答被采纳将会获得 1 贡献 已有1人回答
|
|