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

WBOY
Release: 2016-06-06 20:48:14
Original
1335 people have browsed it

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

回复内容:

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

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!