Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Warren Smith  >  Squid Cache Object  >  examples/example.php  >  Download  
File: examples/example.php
Role: Example script
Content type: text/plain
Description: An example script
Class: Squid Cache Object
Parse a binary Squid cache file
Author: By
Last change:
Date: 2006-08-31 04:24
Size: 757 bytes
 

Contents

Class file image Download
#!/usr/bin/php -q
<?php

    
// This will read a Squid cache object (read: cache file) and put the information it
    // finds into public properties of our class so that we can carry out useful admin
    // tasks, like getting the URL from a cache file so we can PURGE it from the Squid
    // cache. This example script was written to be used via the command line.

    // Written by Warren Smith

    // Include the SquidCacheObject class
    
include_once('../SquidCacheObject.class.inc.php');

    
// Instantiate the SquidCacheObject object, providing the Squid cache file as an argument
    
$CacheObject = new SquidCacheObject('./00000061');

    
// This will dump the contents of the SquidCacheObject
    
var_dump($CacheObject);

?>