当前位置:首页 > 代码学苑 > 网建教程

帝国cms熊掌号历史内容接口

来源:师说 作者: 2020-05-06

php Code复制内容到剪贴板
  1. $urls = array(  
  2.     'http://www.example.com/1.html',  
  3.     'http://www.example.com/2.html',  
  4. );  
  5. $api = 'http://data.zz.baidu.com/urls?appid=1585197816243468&token=HUuRZYgrlGLrVysh&type=batch';  
  6. $ch = curl_init();  
  7. $options =  array(  
  8.     CURLOPT_URL => $api,  
  9.     CURLOPT_POST => true,  
  10.     CURLOPT_RETURNTRANSFER => true,  
  11.     CURLOPT_POSTFIELDS => implode("/n"$urls),  
  12.     CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),  
  13. );  
  14. curl_setopt_array($ch$options);  
  15. $result = curl_exec($ch);  
  16. echo $result;  

猜你喜欢
    无相关信息