Home  >  Article  >  Backend Development  >  Both curl and file_get_contents request interfaces in PHP are very slow, but accessing them directly in the browser is very fast. Does this explain the situation?

Both curl and file_get_contents request interfaces in PHP are very slow, but accessing them directly in the browser is very fast. Does this explain the situation?

WBOY
WBOYOriginal
2016-09-30 09:23:112172browse

This is the interface:
http://api.k780.com:88/?app=w...

The problem now is that no matter how I use curl or file_get_contents() to request the interface, it is very slow. I also checked it myself and it said that it is enough to change the domain name to IP, but IP will sometimes be changed, and this website configuration I have a virtual domain name and cannot access it using IP

I would like to ask if there is any way to shorten the time?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn