I need help with PHP
Posted 15 July 2006 - 08:43 PM
Its just an image that I dont want other people getting. Is it possible to take it off the source code when someone right clicks and views source?
Posted 15 July 2006 - 08:53 PM
<img src="showImage.php?image=hidden.gif" />
showImage.php would look something like this:
<?php $filename = $_GET['image']; $handle = fopen($filename, "r"); $image_resource = fread($handle, filesize($handle)); fclose($handle); echo $image_resource; ?>
keep in mind that you may need to change the path, add error checking, etc. but that should accomplish (minimally) what you're after.
Posted 16 July 2006 - 01:45 AM
Where image1 is hidden.gif
Posted 16 July 2006 - 01:53 AM
<img src="showImage.php" />
and change the line in showImage.php to:
$filename = 'hidden.gif';
it all depends on whether you have multiple images you want to hide.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users