Download Remote File Using CURL and PHP
Sometimes you need to download URL’s contents using the CURL library, included inside PHP (e.g if you want to use a web-based API, provided by service like TinyURL, Digg, Twitter). It’s actually very simple and faster to use than other methods of downloading remote file like the file(), file\_get\_contents() or fsockopen(). Also, CURL is very