crashnet
July 18th, 2006, 09:40 PM
I'm drawing a blank here and I'd like a few suggestions if possible. I have a search script that searches through a list of articles stored in a database. What I would like to do is record a users search query and store it in a log file so I can display the last 20-40 searches in an admin panel, meaning i would need to both read and write from this log file.
I know how to read and write from the file, but I anticipate a lot of search queries, hundreds to thousands of them in a given day, and I'd like someway to control the size of the log file without having to manually delete it. Is there a way to automatically delete or purge the log file to make it smaller after 'x' number of searches? Or do you have any other recommendations to do this similar idea?
Thanks for the help!
I know how to read and write from the file, but I anticipate a lot of search queries, hundreds to thousands of them in a given day, and I'd like someway to control the size of the log file without having to manually delete it. Is there a way to automatically delete or purge the log file to make it smaller after 'x' number of searches? Or do you have any other recommendations to do this similar idea?
Thanks for the help!