Jump to content

prattmic

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Everything posted by prattmic

  1. It worked! Thank you so much!
  2. Do you want the log, and you can mess around with it?
  3. ok, Now it doubled everything and put an extra blank line between every line.
  4. Now it deleted the whole log.
  5. Now it got rid of the part that wasn't suppose to be deleted
  6. The script is making my log longer not shorter.
  7. Um, are you going to give me the code?
  8. Yes, except 20 is the oldest. 19 is [code=php:0]?>[/code]
  9. Line 20 is the first line of my log and it is the oldest entry.  Well, since this is for a script that I distribute, the limit would vary meaning it would need some kind of code to add 19/20 to however high the limit is.
  10. I wouldn't want to delete first 19 lines as that would get rid of my header in the log.  And I would want to delete enough so that it is under its limit of lines.
  11. Well, I'm kinda new to PHP, so I get what your saying, but I don't know how to do it.
  12. 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!
  13. No its my fault that I didn't explain good enough.
  14. Thank you for all your help.  If you want to see the full script in action (but not done) it is at http://prattmic.homedns.org/phpsimplechoose/0_7_beta/phpsimplechoose.php
  15. Yes it does, but how do I take away the line number and the IP in the line, since they will all have the same IP anyway.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.