PHP Classes

File: example_image.php

Recommend this page to a friend!
  Classes of 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: 13 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(10, 2, "examplecode", 0); //set the info.

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

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