I have text logs that I wish to auto-prune. This is the header of the log: [code=php:0]<?php // DO NOT DELETE THIS include 'phpsimplechoose_config.php'; //Below is where the verification takes place. Try to play around with it. if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="Please enter User/Password"'); header('HTTP/1.0 401 Unauthorized'); die; } else { if (($_SERVER['PHP_AUTH_USER'] !== $phpsc_username) || ($_SERVER['PHP_AUTH_PW'] !== $phpsc_password)) { header('WWW-Authenticate: Basic realm="Incorrect! Please try again."'); header('HTTP/1.0 401 Unauthorized'); die; } } // To delete log erase everything after the next line, but not the next line itself (Line 20 and down can be deleted) ?>[/code] The rest of the log consists of lines looking somewhat like this: [code]192.168.1.1: Thu August 10, 2006 11:23 : Choice 1. thgfd Choice 2. hfghfghd Choice 3. fgdgfh We say... hfghfghd <br />[/code] What I want to do is when the log reaches X number of the previous entries for it to delete some. However, I want the header not to be deleted. If you need more info, just ask! Thanks in advance!