Let's say we have a huge list of clients (~30) all running on the same server under different users (and other security settings).
I need to write a "spy/logging" script which is able to handle all HTTP traffic without actually modifying it or hindering its execution.
Usually, we have a setup as follows:
Web Browser <--> Apache <--> PHP/FCGI
I need a setup as follows:
Web Browser ---> Apache ---> PHP/FCGI '----> PHP/CLI (or any other script, module...)
I need this set up so that I don't have to change each client's code (and having to maintain it as well), so instead I have only one script to have to manage by myself.
One way to do this is to somehow get a pcap daemon triggering a script of mine each time it receives an HTTP request, but I figured someone out there must have a better way of doing this?