I have a script that gets visitor's ip, counts times the page has been visited and also saves a current date. Now this all works by writing collected data into text files (different files for ip, count and date). Is it possible to print out only a part of the file, for example only certain dates? Which function should I use and how to write the script?
why dont u use a db like mysql instead of files? or if u want use them try to save data in xml pakets... so u can query then in a std way... but i prefer db...
If you must, I'd use an regular expression to search for the line number with the date...
Searching this way is extremely intensive on memory/harddrive.
There are many cheap webhosts with SQL.
you dont even need to use php
write
"cat filename | grep PUTDATEHERE" in unix
or
type filename | find "PUTDATEHERE"
in win