当前位置:Gxlcms > PHP教程 > curl抓取新浪微博http_code显示302?

curl抓取新浪微博http_code显示302?

时间:2021-07-01 10:21:17 帮助过:19人阅读

通过curl抓取新浪微博内容,但是总获取不到,通过curl_getinfo看到http_code为302,该怎么处理?

回复内容:

通过curl抓取新浪微博内容,但是总获取不到,通过curl_getinfo看到http_code为302,该怎么处理?

原来心里微博需要登陆才能抓取,加上curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);就跳转到登陆页面,问题是还得先登陆才能再抓取

人气教程排行