- Sep 10, 2001
- 11,711
- 8
- 81
I want to run a PHP code snippet for every request to any resource under my Apache web server. Basically I want to record their visits to a table as a hit, plus other info.
Now, if this was Java which I am more familiar with, I would code a ServletFilter mapped to all paths and it would just be a class which could access their request data, gather what I want, and save to the database.
Using Apache w/ PHP I do not know how to do this without explicitly adding code to each page. I am hoping there is a way to do this automatically, like ServletFilters.
What are my options?
Now, if this was Java which I am more familiar with, I would code a ServletFilter mapped to all paths and it would just be a class which could access their request data, gather what I want, and save to the database.
Using Apache w/ PHP I do not know how to do this without explicitly adding code to each page. I am hoping there is a way to do this automatically, like ServletFilters.
What are my options?
