It works great if I point it to a jpg on my server, as shown above. Now I want to combine it with a dynamic image script that looks like this:
<?## eventually this script will deliver different images, but one image is hard coded for now$filename = 'oh_noes.jpg';header("Content-type: image/jpg");header("Content-Disposition: attachment; filename=\"".basename($filename)."\"");readfile("$filename") or display_error('The file could not be found.');exit;?>
(I have this script saved with a ".jpg" extension and forced to run as PHP with htaccess.)
The image script works great when called directly, but now I want to combine the two. If I try to use the file time script with the dynamic image script, it doesn't work. How can I make CURLOPT_FILETIME work with a jpg delivered by a PHP script? Is there a way to detect an incoming CURLOPT_FILETIME request and send the right headers to make curl happy?