help! I need a codemonkey - stat

If you touch your software enough does it become hardware?

Moderator: Forum Moderators

Post Reply
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

help! I need a codemonkey - stat

Post by ProfHawking »

I manage to do most things in my travels into html, php etc, however this one has stumped me. I need to offer basic protection to reduce image stealing. On inital inspection i thought it would be easy. But not so apparently. :(
I need a no-right-click script or method that works in Internet explorer (with SP2 installed), and doesnt pop up that yellow bar at the top:

"to protect your computer, internet explorer has restricted this file from showing active content that could access your computer. Click here for options..."

Even the simple tag thing is blocked. Im not sure this is classed as "active content"!
<body oncontextmenu="return false;">
:shakefist:

Any help would be awesome!
Woo Elephant Yeah
Heavy
Heavy
Posts: 5433
Joined: October 10th, 2004, 17:36
Location: Bristol, UK
Contact:

Post by Woo Elephant Yeah »

Have you tried using a javascript such as this one?

Code: Select all

<script language="Javascript1.2">

// (C) 2003 CodeLifter.com
// Source: CodeLifter.com
// Do not remove this header

// Set the message for the alert box
am = "This function is disabled!";

// do not edit below this line
// ===========================
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName=="Netscape"
bIE = navigator.appName=="Microsoft Internet Explorer"

function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
     alert(am)
     return false;
   }
}

document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) window.onmousedown = nrc;

</script>
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

Yep.
All of the scripts like that i have found trigger the "Blip!" and are disabled by the IE6 scriptblock thing.
:cry:
caveman900
Badger
Badger
Posts: 101
Joined: November 30th, 2004, 17:26

Post by caveman900 »

i have no idea how to do this, however imho its not a great idea. ive only seen one script that actually worked recently, and that was on putfile.com. it was very irritating.

my two cents: a no rightclick script will simply irritate visitors (no open in new window in IE, and probably no new tab in firefox), and it wont stop anyone who is at all determined to get their hands on an image. hotlinking protection might help a little, but imho theres not a huge amount you can do.
Joose
Turret
Turret
Posts: 8090
Joined: October 13th, 2004, 14:13
Location: The house of Un-Earthly horrors

Post by Joose »

A random and rather innefficient way you *could* do it would be to embed all the pictures into flash. Course, they could allways just download the flash file, but it makes it a little bit more difficult for them.

You may be able to put some actionscript in the flash to check where it is, and if its not on your site, to not show the image. Dont ask me how though.

Course, if they really, really want the image, they can just take a screenshot. Not a lot you can do to stop that, though.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

i have kind of blocked them already (other than screenshot), by having a transparent image over the top of the image, so when they save it they get a blank thing.
However, ideally we want to tell them to buy the prints. Otherwise they will d/l the blank, and not realise. Only to loose impulse to buy them, when later they realise teir pics dont exist.
We want to tell them there and then to consider buying a print.

putfile & thesun have working system to a certain extent, however when ive lifted the java, it is blocked! They must have something to get around the block that i have missed. Anyone?
mrbobbins
Robotic Despot
Robotic Despot
Posts: 4595
Joined: October 14th, 2004, 21:35
Location: Sitting in a tin can
Contact:

Post by mrbobbins »

ProfHawking wrote:i have kind of blocked them already (other than screenshot), by having a transparent image over the top of the image, so when they save it they get a blank thing.
However, ideally we want to tell them to buy the prints. Otherwise they will d/l the blank, and not realise. Only to loose impulse to buy them, when later they realise teir pics dont exist.
We want to tell them there and then to consider buying a print.

putfile & thesun have working system to a certain extent, however when ive lifted the java, it is blocked! They must have something to get around the block that i have missed. Anyone?
Just have a low res version on the site, if they want good quality they have to pay for it, or watermark the images
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

images are tagged already, and are only 600x450 res.
and the full prints are only 99p inc postage.
I dunno why they bother not buying, but still they do....
pikey students!
Stuk
Monkey
Monkey
Posts: 232
Joined: October 27th, 2004, 19:41
Location: Cambridge
Contact:

Post by Stuk »

If someone wants an image they will get it. You're sending the image data to their computer anyways aren't you.

Anything availible through the right click menu is available other places in the UI, and disabling right click can be more of a fustration than anything (plus Javascript can be disabled).
They can view source and then find the actual image location on your server, avoiding any stuff you may have put on the page.

One way to stop this might be to put all your images in a private directory (use chmod on apache) and then let a php script feed them to your webpage, in the proccess checking that it is being delivered as part of a page and not on its own. I think you can use $_SERVER['PHP_SELF'] to check the name of the page being used to access the image. You might also be able to do this using .htaccess on Apache servers.

The embeding in flash is quite a good idea, but it does require quite a bit of work, seeing as you'll have to do it for each image.

In the end nothing will stop someone detirmined from nicking an image, a nice big watermark will ruin anyone's chances of getting a good quality image, so this is probably your best bet.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

yes yes i know i cant stop them getting the image if they really want to. but thats not the idea
I just want to remind them to buy it!
Whatever fancypants scripts/flash/noclick used nothing stops the all powerful print-screen anyway.
Already the images are marked, They have to register & They are behind a transparent image.
But need the warning alert to tell them again. These are thick people i hear, and tight as a chinamans eye
pixie pie
Cheese Lord
Cheese Lord
Posts: 838
Joined: July 30th, 2005, 23:46
Location: Cambridge, UK

Post by pixie pie »

I suggest, Watermarking.

But also, the invisible image on top, but when they right click it "View image" or something similar it will simply forward them to a page saying "BUY THIS PICTURE NOW ONLY 99P, GAAAH SPAMM JOOO". Or something a bit more subtle. Up to you.
Vowles
Sir Didymus
Sir Didymus
Posts: 376
Joined: November 9th, 2004, 10:26
Location: Uk,Bristol
Contact:

Post by Vowles »

After that,Encrypt the html file upload and woo yay image be stay!
Post Reply