cURL不起作用,但同一站点可与浏览器一起使用 [英] cURL does not work but same site works with browser
本文介绍了cURL不起作用,但同一站点可与浏览器一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用cURL形式的linux服务器访问站点时返回错误的原因是什么.但使用chrome浏览器成功打开此网站.
what are the reasons for when using cURL form linux server to access the site return an error. but opening this site in chrome succeeds.
推荐答案
在发送请求时查找浏览器标头,并将相同的标头添加到cURL请求.某些服务器需要一些标头,浏览器会发送这些标头,而不发送cURL.
Look browsers headers while sending your request, and add same headers to cURL request. Some servers needs some headers that browsers sends default but not cURL.
这篇关于cURL不起作用,但同一站点可与浏览器一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文