Hey anybody have some scripts to hide location of image, where they resides. I found it some website are blocking original location of that image using PHP based site.
Can you explain a little more like what you are trying to do? I'm not sure I follow with your description so far...
U cannot just hide it U can encode your html code, use a lightbox but at the final user can just printscreen and crop ur images I recommend u to use a watermarking solution so no one will be interested more on ur images
You can write a PHP script that outputs the image. Being a PHP script you can add some logic to it so for example if someone is not logged in it won't display the image. Example: <?php // File foo.php header("Content-type: image/gif"); file_get_contents("/home/me/images/blah.gif"); ?> PHP: Now you can create the image tag as <img src="foo.php" />
<input type="image" src="images/pic1.jpg"> PHP: In this case you will not be able to right click on this image and see it's location
You can try and fit a layer with a transperant image on top of the images on your site, that seems to be how flickr does it sometimes. Disabling js still make them possible to copy, but it would be a far better solution. The source code reveals the correct image though, for the people going the extra mile to get it, lol.
If the visitors can review you pictures in browser (eg. IE browser) there is a copy of the picture in the "Temporary Internet Files" . To protect your images and css is not easy .
I just got a quick idea. Make a file named image.php and put this <?php // File foo.php header("Content-type: image/gif"); if($secretcode == "lolwtf") { file_get_contents("/home/me/images/blah.gif"); } else { file_get_contents("/home/me/images/notfound/donttrytosteal.gif"); } ?> PHP: Now in other files like index.php put this -> <?php $secretcode = "lolwtf"; include('image.php'); ?> PHP: secret code can be anything, since others dont know it, they cant use to directly link to your images, neither they can view it without index.php opened up.
Would using mod_rewrite work? e.g.: RewriteEngine on RewriteRule ^thisfolderdoesntexist/(.+)$ /reallocationofimages/$1 Code (markup): messy, you'd have to try it out yourself, but that would hide the hide the location of images like you asked
you know most of the websites are having IMAGE directory or directories to store their IMAGE files (like: images/example.jpg, img/banner.gif , etc., ). These files are known to users(visitors) by viewing source code or right click on that image, see from properties - it shows the original location where it found. Here Im saying about, how to hide these location(s) from public users. That is there any way to display from indirect location or hiding from public views? If u are not much clear about this PM to me ....
Its a good idea Berserker, you are telling what im expected. But I have one doubt on that, can use this code anywhere in PHP scripting? Is it possible to use that image display code in <IMG SRC="image.gif"/> here?