Whats the best what to enable a user to click a download button that then automatically gets a image file and then downloads it to their generic downloads folder or prompts them to save it?
i have tried the following but with no success:
$file = $art[0]['location']; // this is the full url to image http://....image.jpg
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch,CURLOPT_URL, $file);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$file_content = curl_exec($ch);
curl_close($ch);
ect or am i going about this all wrong (probably)
thanks