Login   Register  
PHP Classes
elePHPant
Icontem

File: example1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rubens Takiguti Ribeiro  >  Auto Expires  >  example1.php  >  Download  
File: example1.php
Role: Example script
Content type: text/plain
Description: Example of basic usage
Class: Auto Expires
Set HTTP headers to control browser cache
Author: By
Last change:
Date: 2 years ago
Size: 451 bytes
 

Contents

Class file image Download
<?php
/**
 * Example of basic usage of class AutoExpires.
 * To use the class, you should:
 * - include source of class;
 * - configure expires options
 * - start class
 * - print the document
 * @author Rubens Takiguti Ribeiro <rubs33@gmail.com>
 */
require_once('AutoExpires.class.php');

// Configure expires to 10 seconds
AutoExpires::setCacheTime(10);

// Start the class
AutoExpires::start();

// Print the document
echo 'Hello World!';
exit(
0);