PHP Classes

Protect picture: Protect the path of yours pictures

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 50%Total: 4,179 All time: 727 This week: 488Up
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
Age: 45
All time rank: 251 in France, Metropolitan
Week rank: 178 Down1 in France, Metropolitan Equal

  Files folder image Files (7)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:4,179
This week:0
All time:727
This week:488Up
 User Ratings  
 
 All time
Utility:62%StarStarStarStar
Consistency:59%StarStarStar
Documentation:62%StarStarStarStar
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:50%StarStarStar
Rank:2706