Friday 6 November 2020

How to download a file using curl in php?

How can I use Curl to download a file in PHP if the headers are set to true? can I also get the filename and extension of file?

Example PHP code:

curl_setopt ($ch, CURLOPT_HEADER, 1);
$fp = fopen($strFilePath, 'w');
curl_setopt($ch, CURLOPT_FILE, $fp);


from How to download a file using curl in php?

No comments:

Post a Comment