cpradio
Jul 7th, 2002, 09:53 PM
Originally posted by chrisjk
Arien, not sure if these guys are understanding right, or if i'm not or whatever, but all your need to do in PHP is send the image URL to the browser in the HTTP header, like this
$image_url = "http://www.domain.com/image.gif";
// redirect to image
Header("Location: ". $image_url);
That way, the script actually returns an image rather than just plonking a URL into a page, so it could be used in a VBF sig for example. That's how I do it anyway
Here is my code:
<?php
###############################
## Grab and Display the Images ##
###############################
if (isset($type) && isset($id)) {
if ($type == 0) {
header("Location: ../images/".$id.".gif");
} else {
header("Location: ../images/".$id.".jpg");
}
} else {
header("Location: ../images/spacer.gif");
}
?>
My dilema:
I want to force the user to download a different image then what they are seeing on the page. As of right now they get the same image that is shown but are forced to download it as a bmp instead of gif or jpg format. Does anyone know how to go about this? .htaccess maybe?
I only want to do this, because so many people want a good image stealer protection script and this may get me close.
I am using the above at http://devbytes.cpradio.net/ (top header images)
-Matt
Arien, not sure if these guys are understanding right, or if i'm not or whatever, but all your need to do in PHP is send the image URL to the browser in the HTTP header, like this
$image_url = "http://www.domain.com/image.gif";
// redirect to image
Header("Location: ". $image_url);
That way, the script actually returns an image rather than just plonking a URL into a page, so it could be used in a VBF sig for example. That's how I do it anyway
Here is my code:
<?php
###############################
## Grab and Display the Images ##
###############################
if (isset($type) && isset($id)) {
if ($type == 0) {
header("Location: ../images/".$id.".gif");
} else {
header("Location: ../images/".$id.".jpg");
}
} else {
header("Location: ../images/spacer.gif");
}
?>
My dilema:
I want to force the user to download a different image then what they are seeing on the page. As of right now they get the same image that is shown but are forced to download it as a bmp instead of gif or jpg format. Does anyone know how to go about this? .htaccess maybe?
I only want to do this, because so many people want a good image stealer protection script and this may get me close.
I am using the above at http://devbytes.cpradio.net/ (top header images)
-Matt