I've got a code which has this <img src="thumbnail.php?id=4"> when i look it this file i get the red X
This is my code!!
$file = "http://www.site.com/travel/album/mid/";
$file2 = $row5[mid];
$filename = $file . $file2;
$percent = 0.5;
header('Content-type: image/jpeg');
// Get new sizes
list($width, $height) = getimagesize($filename);
$newwidth = $width * $percent;
$newheight = $height * $percent;
// Load
$thumb = @imagecreatetruecolor($newwidth, $newheight);
$source = @imagecreatefromjpeg($filename);
// Resize
@imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
// Output
@imagejpeg($thumb);
what could be wrong?