httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] Question about how to fetch html?
Date Fri, 12 Jun 2009 23:19:13 GMT
Brian Kim wrote:
> Thanks.
> 
> Sorry for unclear explanations.
> 
> Basically I want to make my proxy system do (1) parsing the html data,
> (2) analyzing the html data, (3) modifying some of the html data and
> then sending it to users.
> 
> Here, the problem is that it is hard to finish (1), (2) & (3) jobs
> before sending the html data.
> 
> I am looking for the way of implementing it.
> 
> Does André or anybody have any idea?
> 
That's indeed a lot clearer.
Use (or write) an Apache filter.
http://httpd.apache.org/docs/2.2/filter.html
It is much simpler and more secure than modifying the Apache code 
itself.  The Apache API has hooks that are foreseen for that kind of thing.

As for me, the easiest way to do that would be a mod_perl output filter.
You might even find one already made, which you could just modify for 
your purposes.
Have a look here :
http://perl.apache.org/docs/2.0/api/Apache2/Filter.html
and here
http://cpan.uwinnipeg.ca/search?query=apache2+filter&mode=dist
and also here :
http://cpan.uwinnipeg.ca/search?query=html&mode=dist
and specially here :
http://cpan.uwinnipeg.ca/htdocs/HTML-Tree/HTML/TreeBuilder.html

Even if you do not know perl, really have a look at these modules and 
read their documentation, it is full of information.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message