PHP实现百度收录源码
侧边栏壁纸
  • 累计撰写 17 篇文章
  • 累计收到 1 条评论

PHP实现百度收录源码

赖毓强
2023-05-14 / 0 评论 / 424 阅读 / 正在检测是否收录...
<?php
$urls = array(
        'https://www.lo888.cn',
    );
    $api = 'http://data.zz.baidu.com/urls?site=https://www.lo888.cn&token=111111111111';
    $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;
?>
0

评论 (0)

取消