Answer the question
In order to leave comments, you need to log in
Filtering HTTP traffic at the exit of the web server
Hello.
Is there a way to programmatically parse what the web server (eg Apache) returns and, for example, correct the returned content.
Cause. There is a script (a mixture of php and cgi) with a closed code, the output of which must be corrected, that is, by host, determine whether to interfere or not, and if you interfere, then apply an algorithm that does not fit into the regexp.
Preferably not too costly in terms of resources. Sometimes 5-10 requests per second to the script ...
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
If you are only interested in the content to be served, then try to configure the execution of all PHP scripts with the auto_prepend_file and auto_append_file settings . The 1st setting will indicate which file to run before starting the main script, and the 2nd setting after the main script is executed. You can also do this with .htaccess
php_value auto_prepend_file /var/www/public/_init_analiz.php php_value auto_append_file /var/www/public/_end_analyz.php
Thanks, but this is already known...
The content needs to be changed, and the problematic script makes it impossible to use ob_*...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question