PHP Classes
elePHPant
Icontem

Protect picture: Protect the path of yours pictures

Recommend this page to a friend!
  Info   View files View files (7)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2004-02-13 (12 years ago) RSS 2.0 feedStarStarStar 51%Total: 4,148 All time: 710 This week: 1,042Down
Version License Categories
class_protect_pictur 1.0.0GNU General Publi...Graphics, Files and Folders, User Man..., S...
Description Author

This class is meant to protect the path of your site pictures in order to prevent that somebody eventually using robot scripts steals the images by accessing the pictures directly.

The class changes the URL of the images used in HTML <input type="IMAGE"> or <IMG> tags using a new URL through which real browsers can retrieve the picture files.

The class requires php 4.0 or later with session support enabled.

To use this class put the protect_picture.php script in the same directory of the script that references thes pictures to be protected. Then, at the beginning of that, just call:

$pprotect = new protect_picture(session_id());

and at the end of your script call

$pprotect->protect();

This class supports all the session_save_handler method : file in most cases with th $_SESSION array or in the others way a cache file

Picture of MARY Matthieu
Name: MARY Matthieu <contact>
Classes: 19 packages by
Country: France, Metropolitan France, Metropolitan

  Files folder image Files  
File Role Description
Accessible without login Plain text file CHANGELOG Doc. LOG changes
Plain text file class_cache.php Class the caches functions
Plain text file class_protect_picture.php Class class file
Accessible without login Plain text file class_protect_picture_example.php Example examples: change the SRC of your pictures to test
Accessible without login Plain text file LICENCE Lic. copy of GPL licence
Accessible without login Plain text file protect_picture.php Appl. script which read files
Accessible without login Plain text file protect_picture_cache.php Appl. this file read the picture in the case you doesn't use files in a sessions_save_handlers way

 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,148
This week:0
All time:710
This week:1,042Down
 User Ratings  
 
 All time
Utility:64%StarStarStarStar
Consistency:60%StarStarStarStar
Documentation:65%StarStarStarStar
Examples:71%StarStarStarStar
Tests:-
Videos:-
Overall:51%StarStarStar
Rank:1933