Active Page Scripting

TeleFinder's Web Server allows users to create dynamic pages which can selectively provide information to clients on the fly, setup file downloading, manipulate forms data, perform custom logging and more.

Active Pages are created using TeleFinder's Server Parsed HTML (SPML) commands which includes the well-known NCSA/NetScape/Apache Server Side Include (SSI ) command set, plus a number of very powerful extended commands.

 

Active Page File Format

The document is parsed as an HTML document, with special commands embedded as comments. Commands are introduced by the pound sign (#) and followed by a list of named, or unnamed parameters.

 

For example:

<!-- #command param_name="param1" param="param2" ... -->

 

or,

<!-- #command "value1" "value2" ... -->

 

or simply a command by itself.

<!-- #command -->

 

The total size of a command and its parameter list is limited to 8192 bytes.

Quoting is necessary for parameters that contain embedded spaces, tabs, returns or other control characters.

Commands and parameters are case-sensitive

Commands cannot be embedded within other commands, but commands can be embedded within an HTML tag.

Sample pages can be found in Web Space/samples/.

 

 

Active Page Commands and Variables

These are the commands that you can use within Active Pages to add dynamic features to your web site.
config

comment

count

deltatime

dir_list

echo

exec

execonly

flastmod

fsize

if, ifnot, else, endif

include

log

mailargs, mailbody

post_to_topic

register

set

topic_next_group

topic_prev_group

topic_list_msg

 

 

Active Page Performance Issues

SPML involves a small amount of parsing overhead, and should be used in place of Plug-In/CGI and external scripting systems whenever possible.

TeleFinder's file caching speeds up SPML performance by retaining the SPML source in memory where it can be quickly parsed.

 

Active Page Setup

TeleFinder has built-in recognition of the ".spml" and ".spm" file extensions and will parse them as Active Pages automatically. Other file types can be interpreted as Active Pages as well, see "Request Handlers" for more information on assigning a handler to a file type.

 

The default page may have a ".spml" or ".spm" file extension. The file type search order is ".spml", ".html", ".spm" and finally ".htm." These types are combined with the Server's Default Page name.

TeleFinder's error pages must have the ".spml" file type.