What do php geeks, professionals, and all others us to log their flat files.
Are there functions that can just log one .php page?
Can the logging in php be controlled?
On a side-note, anyone used this for logging?
[http://www.monperrus.net/martin/phpmodlog%5D%5B1%5D
Apparently my first question was not clear…
You could create a function that uses
fwriteto write your events to a log file.eg:
You should also add checks that the file is writeable, which you can find code for on the
fwritepage.For each of the events that you mention, you can then do:
Expand it to include/do whatever you want.
Edit: You’ve edited your question, but I’ll leave my answer here because you may find it useful. As others have mentioned though, you really can’t reliably tell when someone has closed the browser window. Also changed to append rather than override.