Just a preference tbh.
file_get_contents is like wget curl is like a web browser
file_get_contents is a function, to get the content of a file, for a remote files is slow, no not handlers redirects, caching, cookies cURL is a lib, support https certificates, posts, put, ftp uploading, http form based upload, proxies, cookies, and is much faster alternative
for your problem (API client) I recommend cURL
Обсуждают сегодня