Login   Register  
PHP Classes
elePHPant
Icontem

Protect picture: Protect the path of yours pictures

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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 (10 years ago) RSS 2.0 feedStarStarStar 51%Total: 4,093 This week: 2All time: 678 This week: 975Down
Version License Categories  
class_protect_pictur 1.0GNU General Public Lice...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
Age: 35
All time rank: 241 in France, Metropolitan France, Metropolitan
Week rank: 110 Down1 in France, Metropolitan France, Metropolitan Equal

  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,093All time:678
 This week:2This week:975Down
 User Ratings  
 
 All time
Utility:64%StarStarStarStar
Consistency:60%StarStarStarStar
Documentation:65%StarStarStarStar
Examples:71%StarStarStarStar
Tests:-
Videos:-
Overall:51%StarStarStar
Rank:1503