On Thu, 25 May 2000, Alexei V. Alexandrov wrote:

> Hello modperl,
> 
>   The problem i would like to solve is that i want to catch the actual
>   output from the apache. I have bought "Writing apache modules with
>   perl and C" there are two examples on how to write thing like Echo
>   or NavBar. These two scripts just parse the actual file that is
>   requested by the client. The thing i want to make is that a module
>   written in perl can catch the output (any script [php, cgi, etc.],
>   any html file) and parse the output and make some changes to it (say
>   like parsing href tags). Where should i look?

The short and sweet of it is that you can't. Apache doesn't cache the
output before sending it like some web servers (Roxen comes to mind), it
sends it as you "print" so you can't. There are things you can do.. for
example if your modules are all mod_perl modules you can use the
techniques used by the Filter/Chain modules, or what AxKit does is
overload Apache.pm's print() method and catches the output that way.

Hope that helps...

-- 
<Matt/>

Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org

Reply via email to