Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2004, 04:20 AM
Authorized User
 
Join Date: Jun 2003
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Protect images from being downloaded

Hello there,

i have created an imagegallery in PHP but know i want to protect my images from being downloaded. When you i have tried to catch the onrightclick event in javascript but it didn't work.
Is there some other possibility to prevent a user form downloading those images by right clicking on an image ?

Thx !!

 
Old June 15th, 2004, 06:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 256
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, the only way the image can be displayed by the browser is for it to be downloaded. It goes into the browser's cache of files - a subdirectory, whose location depends on the browser concerned. (On Windows NT systems and Internet Explorer, this tends to be a subdirectory of the Profiles folder, which is exactly analogous to the /home/username/ folder in Unix).

So, effectively, all you'll ever be able to do, is prevent the user saving the files anywhere else on their drive system - and even then, only from within the browser. there's nothing to stop them going into their browser's cache and moving or copying the images into a destination of their choice.
 
Old June 16th, 2004, 04:16 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

PS: Please don't cross-post!

Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::





Similar Threads
Thread Thread Starter Forum Replies Last Post
downloaded code Joseph BOOK: Beginning SQL 5 December 23rd, 2007 09:35 PM
protect source angelboy C# 2005 1 February 12th, 2007 04:13 PM
problem in getting images downloaded Mystic C# 0 July 6th, 2006 04:23 PM
Protect images against download speedyH PHP How-To 1 June 16th, 2004 03:57 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.