PHP Classes

File: example2.php

Recommend this page to a friend!
  Classes of Rubens Takiguti Ribeiro   Auto Expires   example2.php   Download  
File: example2.php
Role: Example script
Content type: text/plain
Description: Example of cache on content modified
Class: Auto Expires
Set HTTP headers to control browser cache
Author: By
Last change:
Date: 12 years ago
Size: 374 bytes
 

Contents

Class file image Download
<?php
/**
 * Example of usage of class AutoExpires.
 * @author Rubens Takiguti Ribeiro <rubs33@gmail.com>
 */
require_once('AutoExpires.class.php');

// Configure to check if content was modified (ignore expires time)
AutoExpires::setStrategies(array('if-modified'));

// Start
AutoExpires::start();

// Print the document
echo 'Dynamic content: ' . $_GET['value'];
exit(
0);