I have tried loading now, 2 images and cannot get the php page, using the code above, to show html without causing errors. It apparently doesn't like the code?? I get nothing as a result after about 20 seconds of waiting and only get garbled text.
Here's what I currently have, just so you can see what I've done:
<?php
header("Content-type: image/png");
clearstatcache();
$image1 = 'CCTV/NYTB0401.JPG';
$image2 = 'CCTV/NYTB0402.JPG';
if (file_exists($image1))
{
$orig_size=getimagesize($image1);
$image = imagecreatetruecolor(320,240);
$background = imagecolorallocate($image, 255,255,255);
$fontcolor = imagecolorallocate ($image, 255,255,255);
imagefilledrectangle ( $image, 0,0,320,240,$background);
$oldimage=imagecreatefromjpeg($image1);
imagecopyresampled ( $image, $oldimage, 0,0, 0,0, 320, 240,$orig_size[0],$orig_size[1]);
$date=date ("F dS Y g:i:s a", filemtime($image1));
imagettftext($image, 12, 0, 30, 200, $fontcolor, 'c:/winnt/fonts/tahoma.TTF', "\n".$date);
imagepng($image);
imagedestroy($image);
}
if (file_exists($image2))
{
$orig_size=getimagesize($image2);
$image = imagecreatetruecolor(320,240);
$background = imagecolorallocate($image, 255,255,255);
$fontcolor = imagecolorallocate ($image, 255,255,255);
imagefilledrectangle ( $image, 0,0,320,240,$background);
$oldimage=imagecreatefromjpeg($image2);
imagecopyresampled ( $image, $oldimage, 0,0, 0,0, 320, 240,$orig_size[0],$orig_size[1]);
$date=date ("F dS Y g:i:s a", filemtime($image2));
imagettftext($image, 12, 0, 30, 200, $fontcolor, 'c:/winnt/fonts/tahoma.TTF', "\n".$date);
imagepng($image);
imagedestroy($image);
}
?>
The thing is... it only shows image ONE and not the second? I've tried laying out the images in a table, but it didn't like the way I did it... that's when it started to hang.
Any more information you can direct me on?
In addition - a sidenote actually, anytime I create ANY HTML in this, it seems to cause it to hang... I comment it out and it works fine, but still, only showing only one picture. I'm sure I've got the correct syntax with the html if I attempt to use it. I'd like to have it set in a table, but cannot format the output to the table... any ideas on why this doesn't or WON'T work?
Thanks again in advance!