HTTP filtering with PHP & Apache ?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I am looking for a full example how I can achieve an http output
filtering with php on an apache 2 server. I found some hints that the
apache server supports to isntall and conifugrate such filters
But I didn't found an example which is related to PHP.

I like to achieve for my shop using a template mechanism based on xml &
xsl with PHP. My idea is currently to use an output filter which does
the xsl transformation.
If anybody knows a tutorial or even some applicable frameworks in this
area please post me here the links.

Many thanks

Mark Egloff

Re: HTTP filtering with PHP & Apache ?

I don't think what you have in mind is possible. The PHP Apache 2
filter executes code embedded in the output stream (with limitation).
It wasn't designed to let a script filter the output stream. You can
get around that through the use of an auto-prepend script and output
buffering. But why use a hack when there're more orthodox way of doing

Re: HTTP filtering with PHP & Apache ?

If you want to generate HTML output from XSL transformations using XML data  
created from a PHP script then take a look at

Tony Marston

Quoted text here. Click to load it

Re: HTTP filtering with PHP & Apache ?

Thanks all for your input.... I found more or less  what I have looked
for. Rather than using an output filter I am using the call back
functions for the output buffer handling.

This simplifies the content rendering too, Also I hoped I could achieve
it with 0 inlcudes...)

or the xslt usage for  php5

function parseOutput()

// php5
$xp = new XsltProcessor();
$doc = DOMDocument::loadXML(ob_get_contents());
return $xp->transformToXML($doc);  


Mark Egloff

Site Timeline