Login   Register  
PHP Classes
elePHPant
Icontem

File: example4.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  >  example4.php  >  Download  
File: example4.php
Role: Example script
Content type: text/plain
Description: Example of cache forever
Class: Auto Expires
Set HTTP headers to control browser cache
Author: By
Last change:
Date: 2 years ago
Size: 388 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 never send 200 response code if user-agent has cache
AutoExpires::setCacheTime(10);
AutoExpires::clearStrategies();

// Start
AutoExpires::start();

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