PHP Classes

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    
Ratings Unique User Downloads Download Rankings
StarStarStar 50%Total: 4,178 All time: 726 This week: 103Up
Version License Categories
class_protect_pictur 1.0.0GNU General Publi...Graphics, Files and Folders, User Man..., S...


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


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: ???
Age: 45
All time rank: 25
Week rank: 368 Down

  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  
This week:0
All time:726
This week:103Up
 User Ratings  
 All time