PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Ming Choi   Expire Class   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example
Class: Expire Class
Generate an encrypted code that expires after time
Author: By
Last change:
Date: 14 years ago
Size: 347 bytes
 

Contents

Class file image Download
<?
//Expire Class Example
//This example make the link last for 10s
require "expire.class.php";

$expire = new Expire(10, 2, "examplecode", 0); //set the info, expire time = 10s

$link = "example_image.php?expire=".$expire->getCurrentCode(); //make a url

echo "<img src='".$link."' /><br />";

echo
"<a href='$link'>".$link."</a>";
?>