cURL and fopen slow in browser, quick via command line

霸气de小男生 提交于 2019-12-11 16:51:18

问题


I have an issue where I am trying to connect to a remote server to retrieve data. There are 2 methods. One is using fopen and the other is using cURL. Both of them are painfully slow in the browser, to a point where it loads and nothing happens. It will just return a "ERR_CONNECTION_RESET" in Chrome.

However, when I run the same script via command line (Apache, Ubuntu), it works rapidly. Are there any obvious reasons why this may be?

This data fetch method works fine on other servers and in command line as I said, but not in the browser for this server. Thanks.

来源:https://stackoverflow.com/questions/19319677/curl-and-fopen-slow-in-browser-quick-via-command-line

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!