Prevent logos and images from web page
Moderator: General Moderators
Prevent logos and images from web page
Hi
how a logos or images of a website can be prevented from downloading.Please tell me methods which i have to follow.
how a logos or images of a website can be prevented from downloading.Please tell me methods which i have to follow.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Actually, you can prevent them from being linked to or dispayed on other webistes by using hotlink protection. I think it's available as module under apache but if you have CPanel access you should be able to set that up from there.mickd wrote:I do not think that is possible. No matter what, the user will have to download the output onto their computer to view it, including images.
You can't stop people visiting your site and taking them from there though.... if you want to display them on a webpage they will be downloaded in any case so that the browser can display them.
Not cheap, but it does the job - stops everything except a screen capture: http://www.artistscope.com/secure_image/
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Couldn't you use PHP with header() to output the image?
Just put all your images in a directory tree like 'you/wont/guess/this/' and then have MySQL store the filename and a random id. Have the script like image.php?random_id=whatever and regenerate a new ID for it each time.
That's what I'm going to use in my upcoming project to prevent hotlinking, seems OK to me?
Just put all your images in a directory tree like 'you/wont/guess/this/' and then have MySQL store the filename and a random id. Have the script like image.php?random_id=whatever and regenerate a new ID for it each time.
That's what I'm going to use in my upcoming project to prevent hotlinking, seems OK to me?
hot linking? what's that?
Is that where other people link directly to your images?
if so... you can fix that with a .htaccess (assuming apache ofcourse...)
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?your-url\.com/ [nc]
RewriteRule .*\.(gif|jpg|png)$ http://your-url.com/img/porn-pic.gif [nc]
this will only allow requests from your domain to view images...
Is that where other people link directly to your images?
if so... you can fix that with a .htaccess (assuming apache ofcourse...)
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?your-url\.com/ [nc]
RewriteRule .*\.(gif|jpg|png)$ http://your-url.com/img/porn-pic.gif [nc]
this will only allow requests from your domain to view images...
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Yeah that's what I was referring toguided1 wrote:hot linking? what's that?
Is that where other people link directly to your images?
if so... you can fix that with a .htaccess (assuming apache ofcourse...)
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?your-url\.com/ [nc]
RewriteRule .*\.(gif|jpg|png)$ http://your-url.com/img/porn-pic.gif [nc]
this will only allow requests from your domain to view images...
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
Wha? You can still download them... the only difference is the filename used to access them. It would be very easily by-passed.jayshields wrote:Couldn't you use PHP with header() to output the image?
Just put all your images in a directory tree like 'you/wont/guess/this/' and then have MySQL store the filename and a random id. Have the script like image.php?random_id=whatever and regenerate a new ID for it each time.
That's what I'm going to use in my upcoming project to prevent hotlinking, seems OK to me?
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Sorry, I missed the point slightly, you can always download the image, because it's been sent to the browser, I can't imagine how that thing Grim... posted would work, even though print screen would get around it anyway...
I just posted my idea to stop hot linking, didn't realise it was so easy in Apache, but you need mod_rewrite enabled don't you? Since I'm on a shared host I doubt it could be enabled if it's off...
I just posted my idea to stop hot linking, didn't realise it was so easy in Apache, but you need mod_rewrite enabled don't you? Since I'm on a shared host I doubt it could be enabled if it's off...
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I think the thing Grim... posted was an applet of some sort... it's not actually an image, it's rendered using some sort of secure plugin rather than the browser...jayshields wrote:Sorry, I missed the point slightly, you can always download the image, because it's been sent to the browser, I can't imagine how that thing Grim... posted would work, even though print screen would get around it anyway...
I just posted my idea to stop hot linking, didn't realise it was so easy in Apache, but you need mod_rewrite enabled don't you? Since I'm on a shared host I doubt it could be enabled if it's off...