Is it possible to load a image using:
<img src="image.php?image_id=1">
?
for image.php:
$image_id = $_GET['image_id'];
echo "image".$image_id.".png";
Is it possible to load a image using:
<img src="image.php?image_id=1">
?
for image.php:
$image_id = $_GET['image_id'];
echo "image".$image_id.".png";
you must return a valid image, use file_get_contents or readfile for get the conent of image then output to browser
header("Content-Type:image/png");
$image_id = $_GET['image_id'];
if(is_file($file = "image".$image_id.".png") || is_file($file = "no_image.png"))
readfile($file);
text/html content-type.Location header to redirect to the image. (If it's accessable through http)Is it possible to load a image use:
<img src="image.php?image_id=1">
Yes. URLs are URLs. It is content-type that determines content, not any characters in the URL itself.
$image_id = $_GET['image_id'];echo "image".$image_id.".png";
Not like that. You either have to read the image file in and then output it with a suitable content-type, or redirect (with a location header) to a static image.