问题
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