PHP Classes
elePHPant
Icontem

File: tail-usage.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Arthur Tumanyan  >  shagaTail  >  tail-usage.php  >  Download  
File: tail-usage.php
Role: Example script
Content type: text/plain
Description: example script
Class: shagaTail
Get the last lines of a file like the tail command
Author: By
Last change:
Date: 8 years ago
Size: 238 bytes
 

Contents

Class file image Download
<?
 
//
 // tail-usage.php
 //
 //
 
require_once("shagaTail.php");
 
$myShaga = new shagaTail;
 
$myShaga->tailFile = 'filename.log';
 for(;;){
    
$line = $myShaga->getStr();
     echo
$line."<br />\n";
    
$myShaga->update();
 }
 
?>