| iMatix home page
| Xitami home page
| << | < | > | >>
Xitami Xitami
Version 2.5b6


Using Filters

Filters are programs that are run with the (usually) HTML file as input. You can write filters in Perl, Awk, C, Rexx, or any other language that can handle standard input/output streams. Filters are a little like CGI programs, except that they are invoked whenever a certain type of file is requested.

Each definition in this section consists of a file extension with a leading dot and a command. The command may be with a full path, or without, if the program is on the PATH. Xitami lets you run scripts directly under OS/2 and Windows 95/NT, if you respect the header conventions noted in the CGI section.

You can pass any type of input file to a filter program, with the restriction that it must be a text file. Binary files will probably not work under MS-DOS-like file systems. Under Unix there is no difference between text and binary files.

Xitami supports filter programs in Perl, C, or any other language that your system supports. A filter program runs when the HTML page is displayed, unlike a CGI program, which runs when the user posts data from a HTML form. An example of a filter program is PHP 3.0, which Xitami supports.

To add your own filter programs, you add an entry in the [Filter] section of the config file. A filter program is invoked whenever a file with the appropriate extension is displayed.

Filter programs need to respect the rules for CGI programs. That is, they should generate the same type of header (Content-Type: text/html). Filter programs also get the standard CGI environment, and are subject to the CGI timeouts and other constraints set in the [CGI] section.

When you POST to a filter program, the form data is supplied on the standard input as for CGI programs. When you use the GET method, the file that is being filtered is provided on the standard input.

| << | < | > | >>
| Welcome To Xitami | Table Of Contents | Installing Xitami | Administration | Configuration | Using The Common Gateway Interface (CGI) | Server-Side Includes (SSI) | Using Filters | Server-Side XML Processing | Server-Side GSL Scripting | Image Maps | Virtual Hosts | The FTP Service | The Dynamic DNS Feature | Throttle Pipes | A Beginner's Guide | Writing Web Server Extension (WSX) Agents | Extending Xitami with External Peer Processes | FAQ | Getting Support | Credits | Release History | License Agreement
Copyright © 1996-2002 iMatix Corporation