You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Vetter <r....@kontor23.de> on 2002/04/25 11:55:01 UTC

Writing a apache module

Hello,

I need an advise. I'm going to write an apache module for internet 
advertisung. This module will deliver creatives (banners, HTML code, 
Flash stuff), count the views and clicks of them, and make some other 
reports. Apache module programming is completely new to me, but I have 
expierence in C programming.
Well, my idea of the thing is to handle HTTP requests in a particular 
format. This format could look for example like this:

GET /myadserver/event/view/banner_id/123456

or:

GET /myadserver/event/click/banner_id/123456/target/www.a-site.com


The module should handle all requests starting with /myadserver, then 
parse the request string, then redirect the request to the 
corresponding banner or the target site, and the update several report 
files. Also: it should be possible to determine the locations of the 
creatives and report files in httpd.conf.
At the moment I don't exacly know what hook funtions are to use for 
this. I primarly have the translate_handler function in mind, but is it 
the only one I need?

Thanks in advance.


Robert Vetter
Internet Application Developer
Kontor23 GmbH
Ottenser Hauptstrasse 56-62
22765 Hamburg
Tel.: 040/380893-14

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Writing a apache module

Posted by Lucas Brasilino <br...@recife.pe.gov.br>.
Hi Robert:

	First of all, there's a mailing list about apache modules,
see http://modules.apache.org. This is a cross posting.
	I'd like to help :) but I'm looking forward apache 2 API.


bests regards

Lucas Brasilino


> 
> I need an advise. I'm going to write an apache module for internet 
> advertisung. This module will deliver creatives (banners, HTML code, 
> Flash stuff), count the views and clicks of them, and make some other 
> reports. Apache module programming is completely new to me, but I have 
> expierence in C programming.
> Well, my idea of the thing is to handle HTTP requests in a particular 
> format. This format could look for example like this:
> 
> GET /myadserver/event/view/banner_id/123456
> 
> or:
> 
> GET /myadserver/event/click/banner_id/123456/target/www.a-site.com
> 
> 
> The module should handle all requests starting with /myadserver, then 
> parse the request string, then redirect the request to the 
> corresponding banner or the target site, and the update several report 
> files. Also: it should be possible to determine the locations of the 
> creatives and report files in httpd.conf.
> At the moment I don't exacly know what hook funtions are to use for 
> this. I primarly have the translate_handler function in mind, but is it 
> the only one I need?

-- 

[]'s
Lucas Brasilino
brasilino@recife.pe.gov.br
http://www.recife.pe.gov.br
Emprel -	Empresa Municipal de Informatica (pt_BR)
		Municipal Computing Enterprise (en_US)
Recife - Pernambuco - Brasil
Fone: +55-81-34167078


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Re: Writing a apache module

Posted by bluejack <ma...@bluejack.com>.
4/25/02 2:55:01 AM, Robert Vetter <r....@kontor23.de> wrote:

>The module should handle all requests starting with /myadserver, then 
>parse the request string, then redirect the request to the 
>corresponding banner or the target site, and the update several report 
>files. Also: it should be possible to determine the locations of the 
>creatives and report files in httpd.conf.

You will find that working with the 1.3 or the 2.0 API's are
quite easy. Some of the good news is that apache parses the
request for you, so you will be able to access the already-parsed
url without any extra work. 1.3 is adequately documented here:

http://httpd.apache.org/docs/misc/API.html

Although you will find that looking at the headers and source
code of other apache modules may help.

2.0 is inadequately documented at this time, so depending on your
capability to learn from bad documentation and other people's source,
I recommend starting with 1.3.

-bluejack


/* ------------------------------------------------------------------ *\
   | http://www.bluejack.com      ||     reviews of science fiction |
   |                              ||     record of the writing life |
\* ------------------------------------------------------------------ */




---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org