That's hotl inking yet. And you can take the image with you if you want to: I think jasimjatjasim2 wants something different but he doesn't want to explain.
the thing is that I wil start with one example suppose my website is example.com my image name is dp.jpg the image dp.jpg is on the folder images_uploaded/images so i can access the image through Code: http://www.example.com/images_uploaded/images/dp.jpg so to insert that image i need to enter the following code Code: <img src="http://www.example.com/images_uploaded/images/dp.jpg"> If we can create a php file called showimage.php and if we use Code: <img src="http://www.example.com/showimage.php?(some random string)/images/dp.jpg"> then it should show the image Code: http://www.example.com/images_uploaded/images/dp.jpg if some one copy the image location which is Code: http://www.example.com/showimage.php?(some random string)/images/dp.jpg it should show only some error mesage or some thing but not the image so the users will not able to find the real directory name which the image contain so can some one develop a php file called showimage.php which works like i explaned above so the image should only display when it is in img tag else it should display some error message
You can create a PHP which hides the real location of your images and then it only shows them when $_SERVER['REFERRER'] value is set for the domain/domains you want. That's hot linking and easy to do in PHP. But that wont prevent anyone of downloading your images. And, since some buggy firewalls replace REFERRER HTTP field with garbage, some user won't be able to see your image even when linked from IMG tag from one of your own pages. Hot linking saves your band width as nobody can use your images right from your web server. But is useless protecting the images themselves.
Of course, If you see an image in a browser, you can take it with right click and save as. I only give an example above. If you want to not let others to give hotlink to your images, I think my solution is ok But if jasimjatjasim2 says "these images are mine and nobody can download my images to their computers" In my opinion Only solution is flash. Isn't it?
And of course, according to jasimjatjasim2 explanation, It is easy to develop a PHP file which generate a random text and keep image files in another directory. it can show images with example.com/showimage.php?(some random string)/images/dp.jpg but in fact the image file's dir is myfiles/uploads/images/dp.jpg This is easy to develop, So what is the problem?
You are right. Your solution is preventing hotlink. Flash can be just another obstacle. As preventing hot linking is. If your flash movie loads the image dynamically, the image file will end up in browser's cache. And detecting the URL of the image (even is it's a PHP) would be pretty easy. You could create a Flash movie with the image inside. That would be better, but the user can always take a screen shot for that matter. In this cases you have to take a look to what big-companies are doing. Image stock sites show you thumbnails with watermark logos on it.
This should work for you -- I say also ensure the container is cloaked and that the showimage script is extremely not able to be hacked, you may find yourself getting ddos attacks on your script...
A good idea indeed. But yet another hotlink preventer. It's much better that just checking the referrer. But it would let all your users without images if the are over a slow connection. Twenty second is too fast to HTTP
İt is not necessary checking with time stamp. You could kill session in image.php so slow connection users will not be effected.