PHP CURL错误 - curl:(56)Recv故障:由对等体重置连接

问题描述:

基本上,此错误只发生在CURL

basically, this error only occurs in CURL

curl: (56) Recv failure: Connection reset by peer

但是当我直接在浏览器上访问链接时,它可以正常工作!

But when I visit it directly the link directly on my browser, it works!

您对修正此错误或造成此错误的原因有何建议?

What are your recommendations on fixing this one or the cause of this error?

注意:服务器编码为ASP,一个API调用

Note: the server is coded in ASP and it only occurs on one API Call

我记得面对这个问题很长时间了。虽然我不记得究竟排序的问题,但我记得尝试以下:

I remember facing this issue a long time back. While I don't remember what exactly sorted the issue, but I remember trying the following:

1)我试图直接传递查询参数的url和我尝试通过POST方法

1) I was trying to pass the query parameters in the url directly and I tried passing through POST method

2)我尝试使用curl代理查看是否可能被其他服务器阻止

2) I tried using a proxy with curl to see if I was possibly being blocked by the other server

3)我相信我也要求我的主机调查它们,并做了一些Apache设置更改

3) I believe I also asked my host to look into it and they made some Apache setting changes