I need some help -- I have a cgi script that prints a new image location everyday.
http://www.my-site.com/cgi-bin/image/image.pl
--> prints new image location with a thumbnail creating php page:
http://www.my-site.com/thumb.php?im...1.jpg&w=80&h=95
but I need to be able to call actual image from that location.
I am thinking of using a daily php script, like image.php that will call the script and the image location, and allow me to show the image like this:
<img src="http://www.my-site.com/daily.php">
Right now I am using this code (http://www.my-site.com/cgi-bin/image/image.pl is the script that rotates the files):
<?PHP
$filename = 'http://www.my-site.com/cgi-bin/image/image.pl';
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header ("Content-type: image/jpg");
readfile("$filename");
}
?>
but it just prints the location of the image file:
http://www.my-site.com/thumb.php?im...2.jpg&w=80&h=95
Any ideas on how I can make it into a jpg file?