PHP CURL抓取 500错误

雾岛 发布于 2016/05/22 12:55
阅读 1K+
收藏 1
PHP

新手请教各位一个问题,curl获取一个网页时,响应状态码为500,可是使用浏览器正常访问时,这个网页是200

于是设置了 UserAgent、Cookie、Referer,

可依然抓取不了:http://emo.fm/

加载中
0
hmh
hmh
curl "http://emo.fm/" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Connection: keep-alive" -H "Accept-Encoding: gzip, deflate, sdch" -H "Accept-Language: zh-CN,zh;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36" --compressed
0
雾岛
雾岛

引用来自“hmh”的评论

curl "http://emo.fm/" -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -H "Connection: keep-alive" -H "Accept-Encoding: gzip, deflate, sdch" -H "Accept-Language: zh-CN,zh;q=0.8" -H "Upgrade-Insecure-Requests: 1" -H "User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.87 Safari/537.36" --compressed
谢谢您
返回顶部
顶部