Tuesday, 13 April 2010

Difference between CURL and FILE_GET_CONTENT?

PHP offers two main options to get a remote file, curl and file_get_contents.
There are many difference between the two.
Curl is a much faster alternative to file_get_contents.

Cheers!

1 comment:

  1. File_get_contents
    -----------------
    1. It is a function to get the contents of a file
    2. We can only able to get data using GET method

    CURL
    -----
    1. It is a library.curl supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading HTTP form based upload, proxies, cookies.
    2. We can able to use GET, POST, PUT and DELETE.
    3. we can set the authentication using HTTPHEADER
    4. we can set the IP address to the input

    ReplyDelete