case read file from local file system)?
well - If an HTTP redirect is encountered, the headers will contain the response line and headers for all requests encountered. - cURL is faster I need test async connections and keep alive, maybe is similar
I review the source code of file_get_content and cURL: file_get_content use php stream (_php_stream_copy_to_mem), then it use wrapper for access to different streams, like as local file or remote file file_get_contents is a wrapper of stream read in c++, and wrapper decide how access to the content, for example, using sockets for remote content or fopen for local files now curl is a wrapper of c++ libcurl, like a black box maybe the implementation of libcurl is better than php stream and wrappers, and for that reason it is faster
remember, by concept, file_get_content is not the same as cURL: function vs lib
Обсуждают сегодня