Posted inAll

difference between curl and file_get_contents

file_get_contents – It is a function to get the contents of a file(simply view source items i.e out put html file contents).

curl – It is a library to do more operations, for example get the contents like file_get_contents, sending and receiving data from one site to another site and it also supports different types of protocols like http, https, ftp, gopher, telnet, dict, file, and ldap. curl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading HTTP form based upload, proxies, cookies.

You can read more about these in http://php.net/

Leave a Reply