ArticleDirectory
- Use a blank image to overwrite a real image
- Picmarkr (details)
- Watermarktool
- Other PHP solutions:
- ASP. NET solution:
- Ruby solution:
- Swfir (details)
- Disable right-click menu
- Disable IE6 image toolbar
Introduction: This is a detailed page of 10 anti-leech protection methods. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 339603 'rolling = 'no'>
10 anti-leech protection methods <SCRIPT> </SCRIPT>
It should be"10 anti-theft Methods", Not"10 anti-leech protection methods", But there are more people looking for anti-leech protection, so I will use this keyword :)
What is the difference between image anti-leech protection and image anti-leech protection?
- Image anti-theft: you do not want your images to be used by others.
- Image anti-leech: you do not want your images to be used by others and consume your server traffic.
Image anti-theft is difficult, and perfect image anti-theft is almost impossible. However, there are still many ways to reduce image theft. Below are 10. Choose one you like.
Hide an image and use a blank image to overwrite the real image
This method prevents others from obtaining real images unless they are viewedSource code.
You can use a transparent image to match the size of the image and overwrite the image.
For example:
<Div id = "image1" style = "background-image:
Url(originalimage.jpg); ">
Height = "250px" width = "300px">
</Div>
In this way, when you right-click an image to view or save it, you can get the transparent image.
Here are two JavaScript frameworks that can implement this image anti-leech method:
- Dwprotector for mootools
- Dwprotector for jquery
Auto cut image super simple
Image tiles
This is a very effective anti-leech Method for images.
It supports two solutions:
- Users can download cropped images.
- The user can download a watermark image.
When a user tries to download an image, it will cut the image or add a watermark, but this method also has a great disadvantage:
- It causes too many Server Request loads and has a bad impact on the overall performance of the website.
- You will have many image files
Use a watermark image (pre-generated)
Adding a watermark to an image in advance is also an effective way to prevent image theft. Even if someone else wants to steal the image, at least they will publicize their website for free.
But the disadvantages also come:
- Images are unclear or not beautiful (this is especially important for Image Display websites, but it is also a special type of websites, especially image anti-theft)
- You can download and crop the watermark. (Of course, if you are the one who places the watermark in the middle of the image or has the watermark as large as 1/3, you don't have to worry about this problem)
To manually add watermarks, you can use Photoshop, gimp, and other software. You can also select the following online image watermark tools:
Picmarkr (details)
Watermarktool
Additional reading: 8 software for adding watermarks to images
Use a watermark (generated on the server side)
It is easy to use the server to automatically add watermarks to images. It only requires some script knowledge.
The following is an example of some related scripting languages:
Asido: PhP Image Processing
Library
AsidoIs a PHP image processing library that can run on GD2, magick wand and image magick.
Here is
AsidoAdd a watermark to an image.
Other PHP solutions:
- Put watermark on images using PHP
- Watermark your
Images with PHP 5 and Gd
- Watermark images on the fly in PHP
ASP. NET solution:
- Thumbnail and watermark images on the fly with ASP. NET
- Watermarking images in ASP. NET with an httphandler
- Coolwatermark (paid)
Ruby solution:
- Rmagick
- Watermarking your images with rmagick
P.s: When I find my conscience occasionally, I will consider the copyright issue:
This automatic watermark method adds a watermark for each tension image, but does it have the right to add a watermark for each image? Unless all the images are original. Perhaps this is one of the reasons why there are few websites that watermarking images abroad.
Use flash to display the image swfir (details)
SWF image replacementAllows the image to be displayed in flash, making right-click Download impossible.
In addition, images can still be styalized using CSS.
Disadvantages: Slow webpage loading.
Context menu for browser-based image anti-theft
Use JavaScript to disable the key menu
It is a method of image anti-theft, but it is only for cainiao on the internet, users of medium points can easily seeCodeGet the image address. You can easily crack it later and disable it!
Therefore, this is not a good method. More importantly, it is extremely detrimental to the user's browsing experience.
You can use a jquery plug-in to disable the Save function.
Disable IE6 image toolbar
When you hover your mouse over an image under IE6, a toolbar is displayed with the Save function. You can disable it using the following code:
<Meta http-equiv = "imagetoolbar" content = "no">
Do you have any other image anti-theft methods? Welcome to share.
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/339603.html pageno: 7.