How does request processing works out from the perspective of a php developer? More than that I'm concerned with e.g. once request is parsed through.htaccess ,mapped to the file and respone is sent back. The mechanism of how this response gets sent back to the client is what I eagerly want to know ? Why? I'm developing a PHP script that needs to know what exactly is coming from the database to the client so that I can alter it in the middle. I cannot tweak the code of the developer as I have to make my script generic enough to work on code that I've never seen before i.e. No tweaking of the exising code. Can I do so in PHP ? Is there something like Global Variable or so to do this or anything else?
For an instance, take any simple login/signup page in PHP. When the user enters incorrect credentials, the page show incorrect username and password, i.e. say the developer is using echo function to achieve this. Now how can I put my script into the middle and expect that echo function to come to me and gets back to client. I' am again repeating, I don't know the code of the developer. The other fact is I can route all the incoming requests to the middle file, but to transfer the request to the actual file, require or include function are of not much good use as they don't allow to send params