There is a link to the image that is uploaded to the server using curl
public function download_remote_file_with_curl($file_url, $save_to) { $ch = curl_init(); curl_setopt($ch, CURLOPT_POST, 0); curl_setopt($ch,CURLOPT_URL,$file_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $file_content = curl_exec($ch); curl_close($ch); $downloaded_file = fopen($save_to, 'w'); fwrite($downloaded_file, $file_content); fclose($downloaded_file); } $ file_url - link to the image, $ save_to - directory on my server
Ordinary php loaders do not fit, because there are a lot of pictures, and the RAM ends, the function does not have time to complete.
But the pictures are big, and you need to reduce them. Before uploading to my server, so how to combine it with curl?