SitePoint Sponsor

User Tag List

Page 1 of 3 123 LastLast
Results 1 to 25 of 75

Hybrid View

  1. #1
    SitePoint Zealot metho's Avatar
    Join Date
    Feb 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Another webpage image anti-copying script: Can you save the image?

    This morning I knocked out an image anti-copying script using mostly PHP but with JS, CSS and flash as well.

    It's going to be used in a few premium content sites and the purpose is to hinder most web users from copying the images or discovering the media location for url browsing.

    There's some crafty coders in here, so I was wondering if you could have a go at trying to get a copy of the image onto your hard drive. If you manage that, could you please post how you did it, so I can try and plug any holes I missed.

    Webpage image protection script

    For advanced FF users, the final version of the script will run on https and you wont be able to save from the media tab. The image doesn't seem to cache in the browser.memory.cache over https.

    Screenshots won't work straight off the bat either.

  2. #2
    SitePoint Addict
    Join Date
    Aug 2007
    Location
    GR
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey man, that's cheating... it's not an image

  3. #3
    SitePoint Zealot metho's Avatar
    Join Date
    Feb 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is an image file - a jpg.

  4. #4
    SitePoint Addict
    Join Date
    Aug 2007
    Location
    GR
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyway....

    Do a http://v2media.biz/php_utilities/ima...protection.php
    and then Save image as.

  5. #5
    SitePoint Zealot fatnic's Avatar
    Join Date
    Aug 2006
    Location
    Lincoln, UK
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or you could just press 'Print Screen', paste into photoshop, crop and save.

    EDIT: Or not as the case may be. Just re-read your post. That's one crafty webpage!!!

  6. #6
    SitePoint Addict
    Join Date
    Aug 2007
    Location
    GR
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You know that the clipboard disabling is a little... global. If your page is open clipboard doesn't work on the OS. Not very user friendly.

  7. #7
    SitePoint Zealot metho's Avatar
    Join Date
    Feb 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    _Steve, did you try the 'save image as' ? The script will be used in a context where the clipboard is the enemy. If the user is inconvenienced by it, they just have to close the window/tab.

  8. #8
    SitePoint Addict
    Join Date
    Aug 2007
    Location
    GR
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried it. Now it says Image not available, I think.

  9. #9
    SitePoint Zealot metho's Avatar
    Join Date
    Feb 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't access the image by a direct url.

  10. #10
    SitePoint Guru MikeBigg's Avatar
    Join Date
    Jun 2004
    Location
    Reading, UK
    Posts
    970
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hehe - noone said it was a user friendly system

    I don't know what happened, but windows-E wouldn't open the windows explorer, mouse clicks seemed to have stopped working (at least they were doing nothing).

    The only way out was to end IE task using task manager.

    I wasn't able to grab the image, though. lol

  11. #11
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,495
    Mentioned
    161 Post(s)
    Tagged
    4 Thread(s)
    Disable javascript

    Oh I forgot... you put another gif on top... lol

  12. #12
    SitePoint Zealot metho's Avatar
    Join Date
    Feb 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nope..

  13. #13
    SitePoint Zealot zalucius's Avatar
    Join Date
    Jul 2007
    Location
    Denmark
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its not easy to grab the image from that page, however, it is possible:


    Simply use IrfanView's screencapture function on timer... dirty, yeah, but it works
    zalucius

  14. #14
    SitePoint Addict
    Join Date
    Aug 2005
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Capture it can also grab the whole page or just the image it and load it into editor.


  15. #15
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by zalucius View Post
    Its not easy to grab the image from that page, however, it is possible:


    Simply use IrfanView's screencapture function on timer... dirty, yeah, but it works
    You don't need the timer. It works with saving to a file instantly as well. Just don't forget to close the page when you want to cut the image out and paste as a new one.

  16. #16
    SitePoint Addict
    Join Date
    Jul 2007
    Location
    San Jose, California
    Posts
    355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How I owned your script

    This is how I got the image:
    Step 1:
    goto
    http://v2media.biz/php_utilities/ima...protection.php
    Displays Image Not Available

    Step 2:
    goto
    http://v2media.biz/php_utilities/image_protection.php

    step 3:
    click back
    click foreward
    click back

    step 4:
    save page to desktop change .php to .jpg

  17. #17
    SitePoint Zealot metho's Avatar
    Join Date
    Feb 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not aiming for impossible; just keeping the images safe from most peeps. Other 3rd party apps such as PSPro can take a screen grab as well. But disabling the clipboard also disables the OS screengrab feature, that's good enough to keep images out of reach for average users.

  18. #18
    SitePoint Zealot metho's Avatar
    Join Date
    Feb 2005
    Posts
    132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does that use your desktop as the image source? Or does it request the webpage...?

  19. #19
    SitePoint Addict
    Join Date
    Aug 2005
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by metho View Post
    Does that use your desktop as the image source? Or does it request the webpage...?
    I'm pretty sure it does a page request, because it a PHP class that does page indexing. It tells you all about the page (CSS, JavaScript, Flash, Java, Ads, cookies [1st party, 2nd party, 3rd party], html, spam rating, keyword stemming, draws a image of the page or any single element in the page, included objects).

  20. #20
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,196
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Why are you wasting your time on creating an anti-leech script?

    As long the image is displayed at the users computer, it is always possible to copy them.

    In this case it took me 5 seconds to save the image using Firefox and the Web Developer plugin.
    This method will also work when its server over ssl.

    It would also be possible to create a curl script doing the same, you just need to set the correct headers simulating a user on your site.

  21. #21
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just pressed the magic key on my keyboard which says 'Print Screen' on it. :P
    That's one way...

    I also just used FireBug to delete the spacer.gif image, then I can just right click the image -> 'View background image', then just right click the image -> 'Save Image As'

  22. #22
    SitePoint Addict
    Join Date
    Apr 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, now that we've established that you can block most people from using it, maybe you should consider whether it's a good idea to treat your visitors like criminals?
    Bring out our hope and reason, before we pine away.

  23. #23
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Atlanta, GA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    curl --dump-header ~/Desktop/cookie.txt http://v2media.biz/php_utilities/image_protection.php

    Get cookie out of the file and insert it into

    curl -b "PHPSESSID=7326cf8c5d84c675c5a5d3bf64a66e54" -e "http://v2media.biz/php_utilities/image_protection.php" http://v2media.biz/php_utilities/ima...on.php?imgID=5 > ~/Desktop/test.jpg

    If I wanted to waste a little more time I could do a quick sh script to automate the whole process.

  24. #24
    From space with love silver trophy
    SpacePhoenix's Avatar
    Join Date
    May 2007
    Location
    Poole, UK
    Posts
    5,000
    Mentioned
    101 Post(s)
    Tagged
    0 Thread(s)
    It disables the clipboard completely for all apps which may possibly be illegal under UK laws (The Computer Misuse Act 1990)

  25. #25
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    New Jersey, USA
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Too easy


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •