Login   Register  
PHP Classes
elePHPant
Icontem

File: example_image.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Kai Ming Choi  >  Expire Class  >  example_image.php  >  Download  
File: example_image.php
Role: Example script
Content type: text/plain
Description: example file
Class: Expire Class
Generate an encrypted code that expires after time
Author: By
Last change:
Date: 4 years ago
Size: 300 bytes
 

Contents

Class file image Download
<?
require "expire.class.php";

header('Content-Type: image/jpeg');    //tell the browser that it's jpg

$expire = new Expire(102"examplecode"0);    //set the info.

if(!$expire->checkCode($_GET['expire'])) exit();    //if the code is invalid

echo file_get_contents("wm.jpg");    //print file
?>