X	Internet
<iADJUSTSLASH
	SRC="path"
SLASH=["\\" | "/"]
>
Usage	Takes the path given in SRC and flips either type of slash into the type specified.  This is useful for handling path compatibility issues on different operating systems.

Example 1	HTML CODE: 
		iadjustslash.ihtml
<!ihtml>

<b>This is a windows formatted path:<br>
<iADJUSTSLASH SRC="c:/iHTML/ihtml_config/images" SLASH="\\" outvar=out1>
:out1<br>
This is a unix formatted path:<br>
<iADJUSTSLASH SRC="\usr\bin" SLASH="/" outvar=out2>
:out2<br>

See Also	Notes on Paths

X	Database
<iFILENEWER
	SRC="path"
DST="path"
>
Usage	Returns true or false depending on if the file in SRC is newer than the file in DST. If DST is not found it returns true.  Newer is determined by the date on the file according to the operating system.  The path may be relative to the directory of the page being served, or may be an absolute hard drive path.

Example 1	HTML CODE: 
		ifilenewer.ihtml
<!ihtml>

<iFILENEWER SRC="file1.txt" DST="file2.txt">

See Also	iFILE, iFILEINFO, Notes on Paths

X	Database
<iFILELINE
NAME = "full path and name to file"
OP = append|(find)|replace|after|before|prepend|lineat|count|delete
INDEX = name of index variable for input/output (0 not found)
DATA = data for line (input only) 
CASESENS = false | true						(false)
ALIAS = "name of the alias"
REGEX = regex to use for a find
FLAGS = regex flags EIN (casesens false is same as i flag)
MAX = (1024) max line length expected
EOFVAR = "variable for eof marker"				(i_eof)
>
Usage	ALIAS is the name of variable used to store a file pointer so regex may be called again for another match, or so a line after the last line fetched can be fetched quickly in the next use of the tag. The NAME may be a path relative to the directory of the page being processed or an absolute disk path.  
	DATA is only relevant for the following OP commands, append, replace, prepend (which place the data supplied in the file at the specified location.
	MAX is the maximum length of line that is in the file.  The lower this value the faster the tag will operate but you will get erroneous results if it is smaller than the actual longest line.
	CASESENS determines if the regex is case sensitive.  
EOFVAR is normally false and true after last line is read, on the call prior to where a 920 would occur.  So the variable can then be checked to see if the reading is at the end of the file.

Example 1	HTML CODE:   
		ifileline.ihtml
<!ihtml>

This finds the line a particular piece of text ([odbc-i01] is on.<BR>

<iFILELINE NAME="odbc.ini" OP="find" REGEX="^\[odbc-i01\]" CASESENS="true" INDEX="linenum" OUTVAR="e_garbage">
:linenum

Example 2	HTML CODE:   
This example outputs a file bresults.txt that is all the lines in the file emailfile.txt that have an @ sign in them.  This is useful for grabbing email addresses out of a text file.
		Ifileline2.ihtml
<!ihtml>

<!ihtml TIMEOUT=1200>

<iEQ NAME="nextline" VALUE="1">
<iUNDEFINE i_error>
<iEQ NAME="i_error" VALUE="0">
<iFILELINE name="emailfile.txt" OP=lineat index="nextline" max=4096 OUTVAR="newline" ALIAS="f1" EHANDLE=inline>

<iIF EXPR=`:i_error = 920` ALIAS="xeof">
	<iEQ NAME="done" VALUE="true">
<iELSE ALIAS="xeof">
	<iEQ NAME="done" VALUE="false">
</iIF ALIAS="xeof">

<iWHILE NOTALIAS="done" MAXITERATION=50000>

<iIF COND=<iSTRIN SRC=`:newline` DST="@">>
<iFILE OP=append NAME="bresults.txt" DATA=`:newline
`>
</iIF>

<iUNDEFINE i_error>
<iEQ NAME="i_error" VALUE="0">

<iEVAL EXPR=":nextline + 1" OUTVAR="nextline">

<iFILELINE name="emailfile.txt" OP=lineat index="nextline" max=4096 OUTVAR="newline" ALIAS="f1" EHANDLE=inline>

<iIF EXPR=`:i_error = 920` ALIAS="xeof">
	<iEQ NAME="done" VALUE="true">
<iELSE ALIAS="xeof">
	<iEQ NAME="done" VALUE="false">
</iIF ALIAS="xeof">

</iWHILE ALIAS="done">

See Also	iFILE, iREADLINE, iWRITELINE, iFILEINFO, Notes on Paths

X	Database
<iDISKSTAT
	OP="free | total"							(free)
PATH="path of any file on disk"
>
Usage		Both operations return a value in bytes
Free - number of bytes free
Total - total number of bytes on the disk

Note that the path can not just be a drive letter, it must end in a \ or / depending on your operating system.  It can be a specific file or directory but it will only return the total or free for that virtual drive not the directory or specific file. The path may be relative to the page being served, or an absolute disk path. For example, to find the storage available on the volume containing the current page use a path=”.” (a single dot is the current director).

Example 1	HTML CODE: Windows Example
		idiskstat.ihtml
<!ihtml>

The total disk space free on C: is 
<iEVAL EXPR='<iDISKSTAT OP="free" PATH="c:\"> / 1024 / 1024' PREC="2"> megabytes.

Example 2	HTML CODE:   UNIX Example
		idiskstat2.ihtml
<!ihtml>

The total disk space free on /var is 
<iEVAL EXPR='<iDISKSTAT OP="free" PATH="/var/"> / 1024 / 1024' PREC="2"> megabytes.

See Also	iFILEINFO, Notes on Paths

X	Database
<iFILETRANSFER
ACTION = append|copy|delete|move|read|rename|(write)
		OUTPUT="expression"
		DESTINATION="destination path"
		SOURCE="source path"
		FILE="filename"
		VARIABLE="variable name"
		ACCEPT="mimetype"
		FILEFIELD="filename"
		NAMECONFLICT="(error)|skip|overwrite|makeunique"
>
	
Usage	The NAMECONFLICT determines what happens if there is a name conflict, either generate an error, skip the file, overwrite the file or make a unique file.

APPEND - OUTPUT, DESTINATION        Evaluates the expression in OUPUT and appends the result to the end of the file specified in the DESTINATION attribute. 
 
COPY - SOURCE, DESTINATION          Creates a copy of the file identified in SOURCE to the file path specified in DESTINATION. 

DELETE - FILE Deletes the file specified in the FILE attribute. 

MOVE - SOURCE, DESTINATION Moves the file identified in SOURCE to the file path specified in DESTINATION. 

READ - FILE, VARIABLE Reads the contents of a text file specified in the FILE attribute, and sets the variable named by VARIABLE. 

RENAME - SOURCE, DESTINATION Moves the file identified in SOURCE to the file path specified in DESTINATION. 

WRITE - OUTPUT,FILE Evaluates the expression in OUTPUT and writes the result to the file specified in FILE. 

Example 1	HTML CODE: 
		ifiletransfer.ihtml
<!ihtml>
<iFILETRANSFER ACTION=write FILE="c:\temp\test.txt" OUTPUT="First write... ">
<iFILETRANSFER ACTION=append OUTPUT="Appended text..." DESTINATION="c:\temp\test.txt">
<iFILETRANSFER ACTION=read FILE="c:\temp\test.txt" VARIABLE="out">
:out <p>
<iFILETRANSFER ACTION=copy SOURCE="c:\temp\test.txt" DESTINATION="c:\temp\test2.txt">
<iFILETRANSFER ACTION=read FILE="c:\temp\test2.txt" VARIABLE="out">
:out <p>
<iFILETRANSFER ACTION=rename SOURCE="c:\temp\test2.txt" DESTINATION="c:\temp\test3.txt">
<iFILETRANSFER ACTION=write FILE="c:\temp\test3.txt" OUTPUT="Second write...">
<iFILETRANSFER ACTION=read FILE="c:\temp\test3.txt" VARIABLE="out">
:out
<iFILETRANSFER ACTION=delete FILE="c:\temp\test.txt">
<iFILETRANSFER ACTION=delete FILE="c:\temp\test3.txt">

See Also	iDOWNLOAD, iFTP, iCOPYFILE, iXCOPY, Notes on Paths

X	Traditional
<iDECODE
	TYPE=[base64 | des3 | des | rc2 | rc4 | blowfish ]		(base64)
SRC=" "
KEY=" "
>
Usage	SRC is the text to decode.  The tag supports base64 and des3 encoding, among others.  KEY is the encryption key.  The key must be exactly 24 characters in length for type="des3".

	When using any of the crypto codecs, the tag also assumes the input will have been base64 encoded since it came from a text based transport of some sort, so it performs a predecode to a raw format and then uses the crypto codec specified.

	This tag requires that the cryptographic lib be present (libcrypto.so / libeay32.dll) attempts to use crypto codecs will fail, and more detailed information will be present in :i_error_libcrypto if the library is the source of the problem. Problems can include, permissions to open the library, library not in path, functions missing due to an outdated version, etc. The version must be at least 0.9.6g – see www.openssl.org for current versions.

Example 1	HTML CODE: 
		idecode.ihtml
<!ihtml>
<iEQ NAME="codestring" VALUE="abcdefg">
source: :codestring<br>
<iENCODE SRC=":codestring" type="base64" OUTVAR="str1">
encoded: :str1 <br>
<iDECODE SRC=":str1" OUTVAR="str2">
decoded: :str2 	

See Also	iENCODE, iMD5

X	Traditional
<iENCODE
 	TYPE=[base64 | des3 | des | rc2 | rc4 | blowfish]		(base64)
SRC=" "
BREAK=" true | false"						(false)
KEY=" "
>
Usage	SRC is the text to decode. KEY is the decryption key, which must match the key used to encode the text.  The key must be exactly 24 characters in length for type="des3".

BREAK controls line breaks when using b64 coding. It is designed for transports limited to an 80 character line (like email)

	When using any of the crypto codecs, the tag also assumes the output will need to be base64 encoded since it will be used in a text based (7bit) transport of some sort, so it performs a post-encode to the raw output of the codec specified. 

	This tag requires that the cryptographic lib be present (libcrypto.so / libeay32.dll) attempts to use crypto codecs will fail, and more detailed information will be present in :i_error_libcrypto if the library is the source of the problem. Problems can include, permissions to open the library, library not in path, functions missing due to an outdated version, etc. The version must be at least 0.9.6g – see www.openssl.org for current versions.

Example 1	HTML CODE: 
		iencode.ihtml
<!ihtml>
<iEQ NAME="codestring" VALUE="abcdefg">
source: :codestring<br>
<iENCODE SRC=":codestring" type="base64" OUTVAR="str1">
encoded: :str1 <br>
<iDECODE SRC=":str1" OUTVAR="str2">
decoded: :str2 	

See Also	iDECODE, iMD5

X	Traditional
<iDISPLAY	SRC="data to display"
FMT="number|decimal|dollar|yesno|paragraph|stripcr|Code|edit|Constant |naphone"								(number)
>
Usage		SRC contains the text to display, FMT contains type of formatting to apply.

Number – numeric form
Decimal – decimal number
Dollar – leading $ and trailing 2 decimal places
Yesno – a Yes or No based on true/false, 0/1 etc…
Paragraph – as a paragraph
Stripcr – take out carriage returns
Code – URL encode and wrap with <PRE> tags
Edit – URL encode
Constant – escape $ with $$
Naphone – North American phone format (905) 680-0436

Example 1	HTML CODE: 
		idisplay.ihtml
<!ihtml>
<iEQ NAME=vname VALUE="123456789">
<iDISPLAY SRC=:vname FMT="number" OUTVAR=output>
:output<br>
<idisplay src="some text" fmt="constant" OUTVAR=output>
:output<br>
<idisplay src="AOL Time Warner sued Microsoft in federal court Tuesday seeking damages for harm done to AOL's Netscape Internet browser, which had ruled computer desktops until Microsoft began giving its competing browser away.
" fmt="paragraph" outvar="output">
:output<br>
<iDISPLAY SRC="c:\temp\test.txt" FMT="Code" OUTVAR=output>
:output
<iDISPLAY SRC="10.99" FMT="dollar"><br>
<iDISPLAY SRC="10.1" FMT="decimal"><br>
<pre><iDISPLAY SRC="line1

line2" FMT="stripcr"></pre>
<iDISPLAY SRC="text to edit" FMT="edit">

	

See Also	iPRINTF

X	Traditional
<iVARIABLELIST
VARIABLES="variablestartname"
PREFIX=""
BETWEEN=""							(=\")
SUFFIX=""								(\"\r\n)
>
Usage	This tag will tag a list of similarly named variables (ie: that start with the same name) and create a string.  The string could then be put into a list using the iLISTCREATE tag.

Example 1	HTML CODE: 
		ivariablelist.ihtml
<!ihtml>
<iset name1=fred name2=jon name3=jeff>
<ivariablelist variables=name prefix="" between=": " suffix="<br>"> 	

See Also	iEQ, iSET, iLISTCREATE

X	Database
<iDSNCONFIG
DSN="name of the datasource"
[DRIVER="path to driver | driver from odbcinst.ini"]
[TYPE="user|system"] 						(system)
INDEX=""								(1)
NAME=""
SECTION="letter of section"					(a) 
[DELETE=true|false]						(false)
>
Usage		
If only dsn= is supplied, then the tag will output a form to edit the dsn.  First, user dsn's will be searched then system unless type is specified.

If dsn= and driver= are supplied, then a new dsn will be created for the driver specified by driver=.  It will be a user dsn if type=user and a system if type=system.  Default type is system.  

If dsn= but not driver but the other directives are supplied then the tag will populate the i_dsn_* variables with information about the specified DSN.  SECTION will get the information about the specified section of the DSN configuration file. (opayc-o##.config.ini).  The config.ini file must be in the same directory as the driver file for the specified datasource.

NAME is the name of the field to get information for in the appropriate section of the ODBC configuration for the DSN.  INDEX performs the same task but used to iteratively get the name value pairs when the names are not known.

i_dsn_done – this is set to true when the dsn being queried does not exist.
i_dsn_name – the name of the config field
i_dsn_field – the value of the config field
i_dsn_help – help text for the field
i_dsn_inputtype – the type of input for the field (radio, text etc….)
i_dsn_default – the default value for the field
i_dsn_alt – alternative field
i_dsn_numalts – number of alternative fields

driver="" currently does not accept a driver name.  This is a known limitation in the tag because odbc drivers are most commonly registered in one central place in odbcinst.ini, not within dsn's.

Example 1	HTML CODE: 
		idsnconfig.ihtml
<!ihtml>

<FORM>
<SELECT>

<iLISTCREATE NAME="list1">
<iEQ NAME="dsnname" VALUE='<iDSN LIST="first">'>
<iEQ NAME="continue" VALUE='<iSTRLEN SRC=":dsnname">'>
<iWHILE ALIAS="continue">
	<iLISTINSERT NAME="list1" ITEM=":dsnname" OP="push">
	<iEQ NAME="dsnname" VALUE='<iDSN LIST="next">'>
	<iEQ NAME="continue" VALUE='<iSTRLEN SRC=":dsnname">'>
</iWHILE ALIAS="continue">

<iLOOP INITIAL="1" FINAL='<iLISTGET NAME="list1" OP="count">' >
	<iEQ NAME="temp" VALUE='<iLISTGET NAME="list1" OP="pop">'>
	<iIF COND='<iSTRIN SRC=":temp" DST="opayc-o" CASE="false">' ALIAS="one">
		<iDSNCONFIG DSN=":temp" TYPE="system" NAME="SYSTEMNAME" EHANDLE="inline" SECTION="a">
		<OPTION VALUE=":temp" <iIF COND='<iSTRICMP SRC=":temp" DST=":CurrDSN">' ALIAS="two">SELECTED</iIF ALIAS="two">> :i_dsn_default
		<iDSNCONFIG DSN=":temp" TYPE="system" NAME="SYSTEMNAME" EHANDLE="inline" SECTION="b">
		<iIF ALIAS="dsnopayc" NOTCOND=":i_dsn_done">
			<OPTION VALUE="b-:temp" <iIF COND='<iSTRICMP SRC="b-:temp" DST=":CurrDSN">' ALIAS="two">SELECTED</iIF ALIAS="two">> :i_dsn_default
		</iIF ALIAS="dsnopayc">
	</iIF ALIAS="one">
</iLOOP>
</SELECT>
</FORM>

See Also	iDSN, iDSNSTORE, Notes on Paths

X	Database
<iDSNSTORE
	>
Usage 
This tag doesn't have any directives.  It looks for defined variables on the page that start with "idsn" and writes them out to the odbc configuration.

idsn_dsn is the dsn name
idsn_type is either user or system
idsn_driver is the dsn's driver name

After calling this tag, idsn_dsn, idsn_driver, idsn_type will be undefined.  This is done to speed up searching for other vars.

Example 1	HTML CODE: 
		idsnstore.ihtml
<!ihtml>
<iEQ NAME=idsn_dsn VALUE="idsn_dsn_example1">
<iEQ NAME=idsn_type VALUE="idsn_type_useorsys">
<iEQ NAME=idsn_driver VALUE="idsn_drivername">
:idsn_dsn       :idsn_type      :idsn_driver>p>
<iDSNSTORE>
:idsn_dsn       :idsn_type      :idsn_driver

See Also	iDSN, iDSNCONFIG

X	Traditional
<iLISTSORT
	NAME="name of the list to sort"
SORT="stri | strs | numb"					(stri)
>
Usage	This tag will sort a list created with iLISTCREATE in alphabetical or numeric order.  Internally it uses the Quick Sort algorithm.  NAME is the name of the list to sort which must exist already. SORT is the type of sort, STRI is string case insensitive, STRS is string case sensitive and NUMB is numerical.

	Tip : If you wish to reverse the sort order, simply work backwards through the list when accessing the sorted items.

Example 1	HTML CODE: 
		ilistsort.ihtml
<!ihtml>

<FORM>
<iFORMAT>
<iLISTCREATE NAME="images" TYPE="none">
<iSET testvar="true" firstvar="true">
<iWHILE EHANDLE="inline" ALIAS="testvar">
	<iSET testvar="false">
	<iDIR EHANDLE="inline" PATH="./" MASK="*.*" FIRST=":firstvar" OUTVAR="filename">
	<iIF NOTCOND='<iSTRICMP SRC=":filename" DST="">' ALIAS="if1">
		<iSET testvar="true">
		<iSTRRIGHT NUM="4" SRC=":filename" OUTVAR="ext">
		<iIF EXPR='<iSTRICMP SRC=":ext" DST=".jpg"> OR <iSTRICMP SRC=":ext" DST=".gif">' ALIAS="if2">
			<iLISTINSERT NAME="images" ITEM=":filename" OP="push">
		</iIF ALIAS="if2">
	</iIF ALIAS="if1">
	<iSET firstvar="false">
</iWHILE ALIAS="testvar">
</iFORMAT>
<iLISTSORT NAME="images">
<SELECT NAME="someimage">
	<OPTION VALUE="">- Pick Existing Image Here -
	<iLISTGET NAME="images" OP="count" OUTVAR="numleft">
	<iWHILE ALIAS="numleft">
		<iLISTGET NAME="images" OP="pop" OUTVAR="filename"><iIMGSIZE NAME="./:filename" WIDTH="width" HEIGHT="height" EHANDLE="inline">
		<OPTION VALUE=":filename   :width   :height">:filename
		<iLISTGET NAME="images" OP="count" OUTVAR="numleft">
	</iWHILE ALIAS="numleft">
</SELECT>
</FORM>

See Also	iLISTCREATE, iLISTGET, iLISTINSERT

X	Internet
<iMD5	SRC="string to hash"
LEN="length of data"
	FILE="file to generate MD5 for"
	SRCVAR="variable name"
>

Usage	This tag implements the MD5 hashing algorithm.  A hash of SRC is returned.  For more information on MD5 simply search the internet with your favourite search engine.  This tag is useful storing credit card information or making up a cookie or session value.

	MD5 is known as a one way encryption algorithm since it is not reversible. It may be only used to encode values, not decode them. On the surface it may seem useless, however that is not the case. 

	A secure password system can be built very simply with a one way coder. 
	1) take the plaintext password and encode it, store the encoded version.
	2) when authenticating a user they enter their plaintext password, encode it and compare the two encoded versions (entered and stored). A match means the plaintext matched as well.
	Being able to view the encoded password does not compromise security since there is no way to generate the original back from the encoded version.

FILE can be used to specify a path and file to get an MD5 hash on without having to load it into RAM.  
SRCVAR defaults to nothing, alternative to FILE="" or SRC= for content - must supply a LEN with this one or you get an error since it is intended for binary data otherwise use SRC=

Example 1	HTML CODE: 
		imd5.ihtml
<!ihtml>

<iTICKS OUTVAR="makeid_ticks">
<iDATETIME OUTVAR="makeid_time">
<iCOOKIE NAME="custid:storeid" PATH="/" VALUE=`<iMD5 SRC=':makeid_ticks-:i_ip-:makeid_time'>` DISCARD="true">

See Also	iDECODE, iENCODE

X	Traditional
<iTICKS	>

Usage	Value of ticks of the process.  Can be used to timestamp things for granulation less than 1 second.  This returns a number in ticks since January 1, 1970.  This is handy in trying to find a performance issue on a page.  

Example 1	HTML CODE: 
		iticks.ihtml
<!ihtml>

<iTICKS>

<iEQ NAME="total" VALUE="0">
<iLOOP INITIAL=1 FINAL=1000>
<iEVAL EXPR=":total + :i_loop" OUTVAR="total">
</iLOOP>

<iTICKS>

See Also	iTIME

X	Internet
<iPACK	COMPRESS=[ true | false]					(true)
	SRC="[root dir to start pack in]"
	DST="[path to place packed file including name]"
	REGEX=[(*.*)]
	RECURSE=[ true | false]						(true)
	FLAGS=[(i|e|n|s)&(b|d)]			
IGNOREPE= [ true | false]					(false)
OPTIMIZE= [ true | false]						(false)
>
Usage	This implements the BZIP algorithm for creating archives of file sets in a compressed format similar to tar.gz or .zip.  This is a very powerful tag for creating download systems that allow picking and choosing of different things to include in the download.  Also handy for inter-system file sharing when more than one file is involved.  The Inline Installer shell uses these tags for it's packaging mechanism. 

RECURSE sets whether to go into subdirectories or not when collecting files into the package.
COMPRESS selects whether to compress the aggregate file with bzip compression or not. The package file itself is aggregated as a series of chunks for each original file in a standard RIFF envelope file. Riff files are in common use, but we know them mostly by the types of data they most commonly contain. Wav is probably the most common Riff file one would run across and it contains solely audio chunks.
The REGEX and FLAGS have the same usage as in other regex based tags for selecting a subset of files to include.  IGNOREPE when set to TRUE will ignore permission errors.  When OPTIMIZE is set to true the compression is optimized for size over speed.

Example 1	HTML CODE: 
		ipack.ihtml
<!ihtml>

<iPACK
COMPRESS="true"
REGEX=".*"
FLAGS="EIN"
DST="fileset/filename.bz2"
SRC="/somedirectory/"
>    

See Also	iUNPACK, Regex tags, Notes on Paths

X	Internet
<iUNPACK
	SRC="[filename to unpack]" 
DST="[hard drive location to place extracted files]"
	DECOMPRESS = true|false>					(true)
>
Usage		This performs the reverse process of the iPACK tag extracting files from a package file.

If you compressed the file with the iPACK tag, use DECOMPRESS here to bunzip it before extracting the individual files

Example 1	HTML CODE: 
		iunpack.ihtml
<!ihtml>

<iUNPACK DECOMPRESS="true" SRC="/installdir/latest_patch.bz2" DST="/installdir">                        

See Also	iPACK, Notes on Paths

X	Flow
<iSETERROR
	ERROR="error number to set"						(710)
DETAIL="content for errordetail"					("")
>
Usage	This is used for debugging purposes to deliberately set an error condition.  ERROR contains the error number to set.  Detail will be what goes in the i_errordetail variable. Any error number whether predefined in ihtml already or not may be used.

Example 1	HTML CODE: 
		iseterror.ihtml
<!ihtml>

<iSETERROR ERROR="760" DETAIL="">

See Also	iERROR, iRESUME

X	Traditional
<iWATCHDOG
	[TIMEOUT="time in seconds"]					(60)
>
Usage	This tag resets the watchdog timer used to time out a page that takes too long to run.  The default PAGETIMEOUT setting in 300 seconds and comes from the registry.  You can set that on a per page basis with the <!ihtml TIMEOUT=""> tag.  Using this tag allows the page timeout to be increased while processing the page, or decreased if there is a special need for this.  This is useful for pages that are known to take longer than the default PAGETIMEOUT setting.  Especially helpful to put inside a long loop.  A timeout will give an error 95 or 96 depending exactly what was going on when the timeout occurred.

Example 1	HTML CODE: 
		iwatchdog.ihtml
<!ihtml>

<iWATCHDOG TIMEOUT="900">

See Also	iERROR, !iHTML

X	Traditional
<iINCR	NAME="name of variable to increment"
	AMOUNT="value to increment by"					(1)
>

Usage	Increments the variable in NAME provided by AMOUNT as long as it is an integer.  This tag is more efficient than using iEVAL or iMATH to do a similar thing.

Example 1	HTML CODE: 
		iincdec.ihtml
<!ihtml>

<iEQ NAME="var1" VALUE="4">
<iINCR NAME="var1">
:var1<br>

See Also	iDECR, iEVAL, iMATH
X	Traditional
<iDECR	NAME="name of variable to decrement"
	AMOUNT="value to decrement by"					(1)
	>

Usage	Decrements the variable in NAME provided by AMOUNT as long as it is an integer. This tag is more efficient than using iEVAL or iMATH to do a similar thing.

Example 1	HTML CODE: 
		iincdec.ihtml
<!ihtml>

<iEQ NAME="var1" VALUE="4">
<iDECR NAME="var1">
:var1<br>

See Also	iINCR, iEVAL, iMATH

X	Traditional
<iCAPITALS
	SRC="string of data"
>
Usage		Capitalizes the first letter of each word in SRC.  

Example 1	HTML CODE: 
		icapitals.ihtml
<!ihtml>

<iEQ NAME="out" VALUE="this is a hog">
<iCAPITALS SRC=":out" OUTVAR=result>
the source string is <b>:out<br></b>
the icapitals tag result is <b> :result</b>

See Also	iSTR*

X	Database
<iXCOPY	SRC=”source path”
DST=”destination path” 
REGEX=[regular expression] 					(.*)
FLAGS=[(i|e|n|s)&(b|d)] 						("")
REPLACE=[true| false] 						(false)
MAXFAIL=[max number of failures] 				(0)
RECURSE=[true|false]						(true)
DIRFAIL=[true|false]						(true)
IGNOREPE= [ true | false]					(false)
OPTIMIZE= [ true | false]						(false)
>

Usage	Similar to the DOS xcopy command in that it will copy all files and directories as specified.  RECURSE set to true will also copy the subdirectories.  REPLACE set to true will replace any files that are the same in the source and destination.  SRC is the path to the source files, DST is the destination path for the files.  REGEX and FLAGS can be used as a regular expression to match files to copy.   DIRFAIL set to false will not stop if an error occurs typing to create a directory.  IGNOREPE will ignore permission errors when set to TRUE.  OPTIMIZE=true sets the regex to be optimized.  

Example 1	HTML CODE: 
		ixcopy.ihtml
<!ihtml>

<iXCOPY SRC="/sourcefolder" DST="/destfolder" regex=.* flags="EIN" replace="true" dirfail="false" OUTVAR="tempvar">

	

See Also	iCOPYFILE, iFILE, iXFIND, iXDELETE, iXSIZE, Notes on Paths

X	Database
<iXFIND	REGEX=[regular expression] 					(.*)
FLAGS=[(i|e|n|s)&(b|d)] 						("")
LISTNAME="name of a list to put results in"
	RECURSE="true | false"						(true)
	SRC="source directory"
IGNOREPE= [ true | false]					(false)
OPTIMIZE= [ true | false]						(false)
>
Usage	This will find files based on a regular expression in the REGEX directive based on the SRC directory.  The results of the matches are stored in an iHTML list specified by LISTNAME.  Set RECURSE=true to search subdirectories as well.  IGNOREPE will ignore permission errors when set to TRUE.  OPTIMIZE=true sets the regex to be optimized.  

Example 1	HTML CODE: 
		ixfind.ihtml
<!ihtml>
<iXFIND regex=.* FLAGS="EIN" listname="resultlist" SRC="/sourcefolder"> 

See Also	iCOPYFILE, iFILE, iXCOPY, iXDELETE, iLISTGET, iXSIZE, Notes on Paths

X	Database
<iXDELETE	REGEX=[regular expression] 					(.*)
FLAGS=[(i|e|n|s)&(b|d)]						("")
	RECURSE="true | false"						(true)
	SRC="source directory"
IGNOREPE= [ true | false]					(false)
OPTIMIZE= [ true | false]						(false)
>
Usage	This will delete files based on a regular expression. Set RECURSE=true to delete from subdirectories as well.  IGNOREPE will ignore permission errors when set to TRUE.  OPTIMIZE=true sets the regex to be optimized.  

Example 1	HTML CODE: 
		ixdelete.ihtml
<!ihtml>

<iXDELETE SRC="c:\dirtodelete" REGEX=".*" FLAGS="EIN">

See Also	iCOPYFILE, iFILE, iXCOPY, iXFIND, iXSIZE, Notes on Paths

X	Database
<iXSIZE	REGEX=[regular expression] 					(.*)
FLAGS=[(i|e|n|s)&(b|d)] 						("")
	RECURSE="true | false"						(true)
	SRC="source directory"
IGNOREPE= [ true | false]					(false)
OPTIMIZE= [ true | false]						(false)
>
Usage	This will find the size of a particular regex so the amount of disk space needed can be determined beforehand.  Set RECURSE=true to search subdirectories as well.  IGNOREPE will ignore permission errors when set to TRUE.  OPTIMIZE=true sets the regex to be optimized.  

Example 1	HTML CODE: 
		ixfind.ihtml
<!ihtml>
<iXSIZE regex=.* FLAGS="EIN" SRC="/sourcefolder"> 

See Also	iCOPYFILE, iFILE, iXCOPY, iXDELETE, iLISTGET, Notes on Paths

X	Traditional
<iISCURRENCY
	SRC="string"								("")
>
Usage		Returns true or false if the SRC is a currency type.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>
Symbol $1.99 is a currency:
<iISCURRENCY SRC="$1.99"><br>
Symbol #1 is a currency:
<iISCURRENCY SRC="#1"> 	

See Also	iIS*

X	Traditional
<iISXDIGIT
	SRC="string"								("")
>
Usage		Returns true or false if the SRC is a HEX number.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>

Symbol 1a is XDigit :
<iISXDIGIT SRC="1a"><br>
Symbol 1g is XDigit:
<iISXDIGIT SRC="1g"> 	

See Also	iIS*

X	Traditional
<iISSPACE
	SRC="stringofdata"							("")
>
Usage		Returns true or false if the SRC is a space character.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>

Symbol '&nbsp;' is space :
<iISSPACE SRC=" "><br>
Symbol A is space :
<iISSPACE SRC="A"> 	

See Also	iIS*

X	Traditional
<iISPUNCT
	SRC=""									("")
>
Usage		Returns true or false if the SRC is a punctuation type character.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>

Symbol # is punct :
<iISPUNCT SRC="#"><br>
Symbol Z is punct :
<iISPUNCT SRC="Z"> 	

See Also	iIS*

X	Traditional
<iISPRINT
	SRC=""									("")
>
Usage		Returns true or false if the SRC is of a printable type.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>
Symbol % is print :
<iISPRINT SRC="%"><br>
Symbol ÿ is print :
<iISPRINT SRC="ÿ"> 	

See Also	iIS*

X	Traditional
<iISGRAPH
	SRC=""									("")
>
Usage		Returns true or false if the SRC is a graphical character.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>
Symbol @ is graph :
<iISGRAPH SRC="&"><br>
Symbol ÿ is graph :
<iISGRAPH SRC="ÿ"> 	

See Also	iIS*

X	Traditional
<iISCNTRL
	SRC=""									("")
>
Usage		Returns true or false if the SRC is a control character.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>
Symbol Tab is CNTRL :
<iISCNTRL SRC="	"><br>
Symbol A is CNTRL :
<iISCNTRL SRC="A"> 	

See Also	iIS*

X	Traditional
<iISASCII
	SRC=""									("")
>
Usage		Returns true or false if the SRC is an ASCII character.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>
Symbol abc is ASCII :
<iISASCII SRC="asc"><br>
Symbol ã is ASCII :
<iISASCII SRC="ã"> 	

See Also	iIS*

X	Traditional
<iISALNUM
	SRC=""									("")
>
Usage		Returns true or false if the SRC is an alphanumeric type character.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>
Symbol a1 is ALNUM :
<iISALNUM SRC="a1"><br>
Symbol : is ALNUM :
<iISALNUM SRC=":"><br> 	

See Also	iIS*

X	Graphics
<iIMAGEBLUR
NAME="name of image canvas"
X1="left coordinate "
Y1="top coordinate "
X2="right coordinate "
Y2="bottom coordinate" 
[STYLE=blur | pixelize] 						(blur)
[SPAN=""] 								(5)
[SHAPE=ellipse|rectangle]					(ellipse)
>
Usage	This tag will blur an image similar to how a TV program blur's an innocent persons face in a news report. SPAN is the span of the averaging of colors.  The SHAPE directive determines the shape of the blur.  The STYLE is either blur or pixelize.  The image canvas referenced by NAME must already exist in memory.
	
Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>

<iIMAGEFROMFILE name=test3 filename=momkid.jpg truecolor=true>
<iimageblur NAME=test3 X1=80 Y1=20 X2=130 Y2=90 STYLE=pixelize SPAN=5 SHAPE=ellipse>
<iimageblur NAME=test3 X1=140 Y1=55 X2=190 Y2=105 STYLE=blur SPAN=10 SHAPE=rectangle>

<iIMAGEWRITE NAME=test3 filename=testimg3.png TYPE=png>

<IMG src = momkid.jpg>A newspaper clipping original<br>

<img src=testimg3.png>hide the faces to protect the guilty<br>	

See Also	iIMAGEWRITE, iIMAGEFROMFILE, iIMAGECREATE

X	Graphics
<iIMAGEGRADIENT
NAME="name of image canvas"
	WIDTH="in pixels"
	HEIGHT="in pixels"
	[OX="origin left"]							(0)
	[OY="origin top"]							(0)	
[OR="start red"]							(0)
[OG="start green"]							(0)	
[OB="start blue"]							(0)
[ER="end red"]							(255)
[EG="end green"]							(255)
[EB="end blue"]							(255)
[ANGLE="in radians"]						(0.0)
[NEAR="true | false"]						(true)
[STEPS="number of steps"]					(32)
[FUNCTION=" "]							(linear)
	[TRUECOLOR=false | true]					(true)
>
Usage	This will generate a gradient in an image with the specified HEIGHT and WIDTH. NAME is the name of the image canvas in memory created with iIMAGECREATE or iIMAGEFROMFILE.

Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>
<iIMAGECREATE NAME=test WIDTH=200 HEIGHT=200>
<iIMAGEGRADIENT name=test width=200 height=200 steps=100 or=255 og=200>

<iIMAGEWRITE name = test filename="testimg.png" TYPE=png>
<IMG src=testimg.png>An image with a gradient in it<br>	

See Also	iIMAGEWRITE, iIMAGEFROMFILE, iIMAGECREATE

X	Graphics
<iIMAGEHUESHIFT
NAME="name of image canvas"
	[RED=""]								(255)
	[GREEN=""]								(255)
	[BLUE=""]								(255)
	>

Usage	This tag will hue shift an image.  So if you want to take an image and give it all a green hue, then set GREEN to 255 and BLUE and RED to 0.  NAME is the name of the image canvas in memory created with iIMAGECREATE or iIMAGEFROMFILE.

Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>

<iIMAGEFROMFILE name=test3 filename=momkid.jpg truecolor=true>
<iimagehueshift name=test3 red = 0 BLUE=255 GREEN=0 >
<iIMAGEWRITE NAME=test3 filename=testimg3.png TYPE=png>

<IMG src = momkid.jpg>A newspaper clipping original<br>

<img src=testimg3.png>Shift the hue to blue and nothing else<br>	

See Also	iIMAGECREATE, iIMAGEWRITE, iIMAGEFROMFILE, iIMAGEMONO

X	Graphics
<iIMAGEMONO
NAME="name of image canvas"
	INVERT=true | false 						(true)
	[RED=""]								(255)
	[GREEN=""]								(255)
	[BLUE=""]								(255)
>
Usage	This tag converts an image to a human perception weighted grayscale and then applies the appropriate HUE.  To get a monochromatic image, set RED, GREEN, BLUE to the desired hue.  NAME is the name of the image canvas in memory created with iIMAGECREATE or iIMAGEFROMFILE.  
To simulate an amber monitor, red=255 green=64 blue=0 name=whatever invert=false.  Then the image will display as it would on an amber monitor

Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>

<iIMAGEFROMFILE name=test3 filename=momkid.jpg truecolor=true>
<iimagemono name=test3 red = 0 BLUE=0 GREEN=0 >
<iIMAGEWRITE NAME=test3 filename=testimg3.png TYPE=png>

<IMG src = momkid.jpg>A newspaper clipping original<br>

<img src=testimg3.png>Now it’s black and white<br>	

See Also	iIMAGECREATE, iIMAGEWRITE, iIMAGEFROMFILE, iIMAGEHUE
X	Graphics
<iIMAGEREPLACECOLOR
NAME="name of image canvas"
	NEWRED=""									(0)
	NEWGREEN=""								(0)
	NEWBLUE=""								(0)
RED=""									(0)
	GREEN=""									(0)
	BLUE=""									(0)
>
Usage	This tag will replace the colour in an image palette.  The old color parameters are specified by the RGB values  in RED, GREEN, and BLUE directives.  The new parameters are in the NEWRED, NEWGREEN, and NEWBLUE directives.  NAME is the name of the image canvas already in memory.

Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>
<iIMAGEFROMFILE NAME="test" FILENAME=momkid.jpg>
<iIMAGEREPLACECOLOR NAME="test" RED=0 GREEN=255 BLUE="255" NEWRED=255 NEWGREEN=255 NEWBLUE=255>
<iIMAGEWRITE NAME="test" FILENAME="momkid2.jpg"><br>
<IMG SRC="momkid2.jpg">A newspaper clipping original 	

See Also	iIMAGECLEARCOLOR, iIMAGEGETCOLOR, iIMAGEGETCOMPONENT

X	Graphics
<iIMAGEPOLY
NAME="name of image canvas"
	POINTS="listname of points"
	COLOR=""
	[STYLE=open | filled]						(open)
	>
		
Usage	This allows the creation of a polygon shape within an image.  A list of points are provided as a list created with the iLISTCREATE tag.  NAME is the name of the image canvas already in memory.  COLOR is the index value in the palette of the color to use.

Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>

<iLISTCREATE NAME= pts>
<iLISTINSERT NAME=pts item=100,100>
<iLISTINSERT NAME=pts item=175,175>
<iLISTINSERT NAME=pts ITEM=80,150>

<iIMAGEFROMFILE name=test3 filename=momkid.jpg truecolor=true>
<iIMAGEGETCOLOR name=test3 TYPE=exact RED=255 GREEN=0 BLUE=0 OUTVAR=colour>
<iimagepoly NAME=test3 points=pts color=:colour style=filled>

<iIMAGEWRITE NAME=test3 filename=testimg3.png TYPE=png>

<IMG src = momkid.jpg>A newspaper clipping original<br>

<img src=testimg3.png><br>

See Also	iIMAGEFILL, iIMAGEGETCOLOR

X	Graphics
<iIMAGEFTTEXT
NAME="name of image canvas"
		TEXT="text to write onto the image"
		X="top coordinate"
Y= "left coordinate"
		COLOR="index value of color for font"
		FONT="facename or path"
		[ANGLE= in radians]						(0.0)
		[POINTS=point size ]						(10)
		[ANTIALIAS=true | false]						(true)
		[LLX=varname]
		[LLY=varname]
		[ULX=varname]
		[ULY=varname]
		[URX=varname]
		[URY=varname]
		[LRX=varname]
		[LRY=varname]
>
Usage	This tag allows the use of TRUETYPE fonts within an image.  The font face name can be specified such as arial.ttf or the full path to the font file may need to be specified.  Only fonts installed on the server machine can be used.  NAME is the name of the image canvas already in memory.  COLOR is the index value in the palette of the color to use.  ANTIALIAS is used to blend the font into the image.  X and Y are the top left hand corner to start putting the text.  POINTS is the point size of the text, ANGLE (in radians) to put the text from the base line.  TEXT contains the text you want to put on the image.  The LLX to LRY parameters take variable names to put the resulting coordinates of the text (LLX means lower left X, URY means upper right Y) rectangle.

Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>

<iIMAGEFROMFILE name=test filename=image1.jpg truecolor=true>
<iImageFTText name=test
					text= "cool text"
					x=10 y=40 
					COLOR=<iIMAGEGETCOLOR name=test type=exact red=255 green=0 blue=0 create=true> 
					font="impact.ttf"
					angle=0.0
					points= 30
					>

<iIMAGEWRITE NAME=test filename=testimg2.png TYPE=png>

<IMG src=testimg2.png>And then laying a font over top<br>

See Also	iIMAGEWRITE, iIMAGETEXT

X	Graphics
<iIMAGEMORPH
NAME="name of image to create"
	WIDTH="width size"							()
	HEIGHT="height size"							()
	X="X coord to place image within new image"			(0)
Y="Y coord to place image within new image "			(0)
	INTERIOR="imagename"							()
	ATLEFT="left image name"						()
	ATRIGHT="right image name"						()
	ATTOP="top image name"						()
	ATBOTTOM="bottom image name"					()
	INFLUENCE="pixels"							(1)
>
Usage	This tag will morph a number of images.  INFLUENCE is the number of pixels from adjacent rows that are mixed into the color.  WIDTH and HEIGHT are the size for the new image.  INTERIOR is the image to place within the new image

Example 1	HTML CODE: 
		iiimagemorph.ihtml
<!ihtml>

See Also	iIMAGECREATE

X	Graphics
<iIMAGEFROMSQL
NAME="name of image canvas"
	SQL="sql statement"						
	DBNAME="datasource name"						
	LOGIN="user/pass"								
>
Usage	Get an image from a database into an image canvas.  The SQL statement must return a result set with the following in this order:  contenttype, contentlen, filename, blobofdata

	The contenttype can be something like "image/jpeg", the length has to be the size of the image data.  Filename is not actually used in this tag and finally the blobofdata is the actual image data.

Example 1	HTML CODE: 
		iiimagenew.ihtml
<!ihtml>

See Also	iIMAGECREATE

X	Internet
</iHTTPSESSION
ALIAS="name of session"
>
Usage		Closes the http session.

See Also	iHTTP, iHTTPSESSION

X	Internet
<iHTTPSESSION
ALIAS="name of session"
URL="url including protocol"
[USER="user name"]
[PASS=" password"]
[SOURCEIP="source IP address to bind to"]
[CERTPATH="path and name of certificate file"]
[CERTTYPE=""]							(PEM)
[PROXY="proxy server ip or hostname"]	
[PROXYUSER=""]
		[PROXYPASS=""]
		[PKEYPATH=""]
[CERTPASSWORD=" The password to the certificate file if applicable."]
		[VERSION="http version number"]				(1.0)
		[SSLPROTOCOL=" SSL2 | SSL3 | SSL23 | TLS1"]		(ssl23)
		[BROKENSSL="true | false"]					(false)
		[TIMEOUT="in seconds"]						(30)
		[CAVERIFY=""]
>
Usage	Opens an HTTP session.  The ALIAS must be unique on the page and can not be an existing variable or alias.  URL is the full protocol and URL for the service to do the http session with.  USER and PASS are to send a username and password if required on the URL specified.  PROXY is the name of the local proxy server if it exists.  SOURCEIP is used to set the IP that the remote server will see.  The CERTPATH and CERTTYPE are used to set certificate details if needed.  The type of certificate is PEM or P12.  If empty then the code will attempt to determine the type of cert based on the file and what's in it. i_error_httpsession is set with any specific errors on this tag.  SOURCEIP, If the IP or hostname specified is multihomed, DNS will use it's rules to select the IP.   The IP or hostname specified must be on the server that the tag is running on.   The requests outward will appear to come from that ip address, not the default ip address of the server (if they differ).  PROXYUSER and PROXYPASS set the username and password for the proxy server.  Warning: This only supports basic auth which is sent in clear text. BROKENSSL is set to true to enable a whole bunch of kludges for broken ssl implementations, generally still works in all other cases if enabled. CAVERIFY is the path of directory or file where CA data stored

Example 1	HTML CODE: Grabbing a page from another server.
		ihttpsession.ihtml
<!ihtml>
<iHTTPSESSION ALIAS="contactpage" URL="http://www.inline.net/contactus.htm">
<iHTTPSESSIONSUBMIT ALIAS="contactpage" METHOD="post">
<iHTTPSESSIONGETBODY ALIAS="contactpage" outvar="out">
:out
</iHTTPSESSION ALIAS="contactpage">

Example 2	HTML CODE: Doing a whois lookup
		Ihttpsession2.ihtml
<!ihtml>
	<iHTTPSESSION ALIAS="a" URL="http://www.idotz.net/whois.cfm">
	<iHTTPSESSIONSETHEADER ALIAS="a" NAME="Content-Type" VALUE="application/x-www-form-urlencoded">
	<iHTTPSESSIONSETHEADER ALIAS="a" NAME="Referer" VALUE="http://www.idotz.net/">
	<iHTTPSESSIONSETHEADER ALIAS="a" NAME="User-Agent" VALUE="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)">
	<iEQ NAME="newdomain" VALUE="inline ">
	<iEQ NAME="source" VALUE="domain=:newdomain&tld=net">
	<iHTTPSESSIONSETBODY ALIAS="a" SRC=":source" LEN='<iSTRLEN SRC=":source">'>
	<iHTTPSESSIONSUBMIT ALIAS="a" METHOD="POST">
	<iHTTPSESSIONGETBODY ALIAS="a" OUTVAR="data" LEN="length">
	</iHTTPSESSION ALIAS="a">

See Also	

X	Internet
<iHTTPSESSIONSUBMIT
ALIAS="name of session"
METHOD="(get) | post | head"
>
Usage	This tag is used to actually do the submit of the http request once all the parameters for it have been set. The METHOD is simply the http method you wish to make the submission with.  POST is like a FORM, GET is like a URL query string, HEAD makes the same request but the server will only respond with the headers, not the body of the response. HEAD is useful for checking if large files are actually up to date without actually fetching the whole thing.

See Also	iHTTPSESSION, iHTTP

X	Internet
<iHTTPSESSIONSETHEADER
ALIAS="name of session"
NAME="name of the header"
VALUE="value to set the header to"
[MULTIPLE="true | false"]						(false)
>
Usage	This is used to set the various headers in an http request.  MULTIPLE -- setting true allows setheader to add multiple copies of the same named header without overwriting the previous one.  Headers include but are not limited to the following

Content-Type
Referer
User-Agent
Charge-To
Pragma
Accept
Accept-Charset
Accept-Encoding
Accept-Language
Authorization
Content-Encoding 
Expect
From
Host
If-Match
If-Modified-Since
If-None-Match
If-Range
If-Unmodified-Since
Max-Forwards
Proxy-Authorization
Range
TE
Allow
Content-Encoding
Content-Language
Content-Length
Content-Location
Content-MD5
Content-Range
Content-Type
Expires
Last-Modified

More at http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.3

See Also	iHTTPSESSION, iHTTPSESSIONGETHEADER

X	Internet
<iHTTPSESSIONGETHEADER
ALIAS="name of session"
NAME="name of header to get"
[MULTIPLE="true | false"]						(false)
>

Usage	Gets the response header variable with the specified name.  If multiple is true headers are returned as value1|value2|valueN|  Put into a list with iLISTCREATE with a SEP of "|" to get the values.  If you set NAME="httpstatus" then it will return the status code of the request.  Setting NAME="all" will return all the headers.  Examples of headers, include

		Server
		WWW-Authenticate
		Location
		Age
		Status-Code
Cache-Control
Connection
Date
Pragma
Trailer
Transfer-Encoding
Upgrade
Via
Warning
Allow
Content-Encoding
Content-Language
Content-Length
Content-Location
Content-MD5
Content-Range
Content-Type
Expires
Last-Modified
Accept-Ranges
Etag
Last-Modified
Proxy-Authenticate
Retry-After	
Set-Cookie

See Also	iHTTPSESSIONSETHEADER, iHTTPSESSION

X	Internet
<iHTTPSESSIONSETBODY
ALIAS="name of session"
SRC="the body of the request"
LEN="length of source in bytes"
>

Usage	This is the body of the request to send.  It is usually a query string of name value pairs.  The LEN value should be specified correctly but if not specified will be calculated automatically.

See Also	iHTTPSESSION

X	Internet
<iHTTPSESSIONSTOREBODY
ALIAS="name of session"
FILENAME="name and path to file"
>
Usage		This tag is used to write the session body out to a file for repeat usage or for later usage.

See Also	iHTTPSESSION

X	Internet
<iHTTPSESSIONGETBODY
ALIAS="name of session"
LEN="variable name"
[XML="an xml alias"]
>
Usage	This gets the length of the body of the http response and puts in the variable specified by LEN.  The output is the resulting page of the request which could then be displayed or put into a variable with OUTVAR and parsed and logic performed on it.  If XML is specified then it will put the body into an XML structure in the alias specified.  The alias should not exist already.  If the body data is not an XML file an error will occur.

See Also	iHTTPSESSION, iHTTPSESSIONSETBODY

X	Internet
<iFAXGATE
TO="Recipient FaxNumber or telex #"
[TYPE=Fax|Telex|TelAnswerback]				(fax)
[ANSWER=answerback#]
[ID=megafaxaccountinfo]
[BILL="billing_code"]
[CUST="Customer_ref"]
[LOGO="number"]
[NOTIFY=None|Cancel|Delivery|Both]				(none)
[Cover=true | false]						(true)
[OFFPEAK=false | true]						(false)
ATTACH="filename"
[QUERY=]
		>

Usage	note: **** id is compared against the faxkeys supplied by inline and is not valid unless approved from that list. 
if using TelAnswerback, answer is the answerback telex to use.  "to" may also be a minicode number stored on the account in use.

***total address length may only be 180 characters
***any of the options may not contain spaces or "." where this is not a field which is part of the message body.
*** separate arrangements must be made with a compatible fax gateway service in order to use this tag.

Example 1	HTML CODE: 
		ifaxgate.ihtml
<!ihtml>

See Also	iFAX

X	Internet
</iFAXGATE
>
Usage		Closing tag of the ifaxgate tag.  Everything in between is what gets faxed.

Example 1	HTML CODE: 
		ifaxgate.ihtml
<!ihtml>

See Also	iFAX, iFAXGATE

X	Traditional
<iRESUME	[ABORT=tag | block]						(tag)
>
Usage	Resumes execution after jumping to an ierror block.  A BLOCK is a section of code like an iIF, iLOOP, iWHILE, iCASE etc…  The resume with ABORT=BLOCK set will resume after the block.  If ABORT=tag is set then execute resumes immediately after the tag the error occurred in.

Example 1	HTML CODE: 
		iresume.ihtml
<!ihtml>
<iERROR>
Error number :i_error caught<br>
<iRESUME ABORT="block">
</iERROR>

Raising an error 2000...<br>
<iIF ALIAS="if1" EXPR="1">
	<iSETERROR ERROR="2000" DETAIL="">
	We never get here<br>
</iIF ALIAS="if1">
Resuming the page with error 2000 raised.. :i_error

See Also	iERROR, iAUTHOR, iSETERROR

X	Traditional
</!iHTML	FILE="filename and path"
ALT="outputtext" 
		ALTFILE="file to send instead"
		SQL="valid SQL statement"
		DBNAME= ""
		LOGIN=""
		STATUS="status code ie: 200"
		TYPE="content type"						(text/html)
		FILTER=""
		FILTERARGS=""
		FILTERTIMEOUT="milliseconds"				(30000)
		IMAGE="name of image canvas"
		IMAGETYPE="jpeg | png | wbmp | xbm"> 
		COLOR=""								(true)
		QUALITY=""								(80)
NON200BODY="true | false"					(false)
XML="xml alias"
>
Usage	This tag may be used to serve up BLOB type data to a browser such as an image or non-text file.  This tag is extremely powerful and can be used for a wide variety of tricks and performance enhancements.

	FILE – path to a file to save the output contents of the page in after all processing is complete. This is used to publish static versions of pages for search engines, or to allow pages to be generated once only in a time period for better performance on a busy server.  This works with text or binary data.

	ALT – Outputs the text supplied here instead of the output of the page – may be used to clean up a mess of output after an error, summarize a failed authentication, etc.

	ALTFILE – Behaves the same as ALT, but serves an entire file specified instead of a set of text. Useful for sending protected objects from another directory when the page is used to authenticate the user. This works because the protected documents or images are not within the webspace and can’t be referenced directly bypassing the authentication.

	TYPE – Sends the content type specified – used with various other combinations of directives to determine the data type the final output is sent as to the browser.

The SQL statement (and DBNAME and LOGIN) if used, must yield a single row of 4 columns content-type (varchar), content-length (int), filename (varchar), blob (binary) in that order, and with compatible types.   Eg:

SELECT  contenttype, contentlength, filename, blobdata from Blobs WHERE ID=0
		
		The columns must be in this order in the result set.

The FILTER directives control the execution of a subprocess. This is a separate application which takes the page contents as its input (stdin), and has its output (stdout) replace the page before being sent to the browser. This is useful for performing various translations such as converting html to pdf, English to French, signing with a digital signature, etc. FILTERARGS are the arguments to send to the filter.  FILTERTIMEOUT is the time in milliseconds to TIMEOUT with no response.

The IMAGE directives control making an existing image canvas on the page into the output of the page. This has application in authentication situations, or to be able to reference an image in a url containing a query string. You may wish to map the image type to ihtml in the webserver, or you may wish to reference images as .ihtml files – both instances have uses, and it is the content type that tells the browser what to do, <img src=myfile.ihml?w=10&h=20> is just as valid as <img src=myfile.png>  COLOR determines true color image or not and QUALITY is the quality setting for a JPEG image. 

XML can be used to server up an XML document from an existing ALIAS that was built on the page.  This is very useful for making an XML server using iHTML.  

STATUS is used to set the status code that the browser will see.  These are the standard HTTP status codes.  The NON200BODY directive is used to specify text to use for the http body when you set a non 200 status code.  For example on a 302 put text like "if you are not redirected in 10sec click here <href.....>"

Example 1	HTML CODE:  Create and serve up an image file
		iblob.ihtml
<!ihtml>

<iIMAGECREATE NAME="img" WIDTH="350" HEIGHT="300" BGR="0" BGB="255" BGG="164">

<iEQ NAME="clrRed" VALUE='<iIMAGEGETCOLOR NAME="img" TYPE="closest" red="255" green="255" blue="255" CREATE="true">' EVAL="true">

<iIMAGEARC NAME="img" X="20" Y="20" WIDTH="20" HEIGHT="20" START="0" END="360" COLOR=":clrRed" PIE="TRUE" FILL="TRUE">

<iIMAGELINE NAME='img' X1="5" X2="200" Y1="12" Y2="90" COLOR=":clrRed">

</!iHTML image="img" imagetype=jpeg quality=100>	

Example 2	HTML CODE:   Serve up an alternative file
		ishowimage.ihtml
<!ihtml>

	</!ihtml altfile=c:/realpathtofile/image.gif type=image/gif>

Example 3	HTML CODE:   Create and serve up a custom PDF file.  Must have HTMLDoc 	installed.  :input is an HTML file to make into a PDF.  
		ipdf.ihtml
<!ihtml>
</!ihtml FILTER="c:/data/clients/htmldoc/htmldoc.exe" FILTERARGS="--webpage -f c:/data/clients/out.pdf c:/data/clients/:input" TYPE="application/pdf" FILE="c:/data/clients/out.pdf">

See Also	Notes on Paths, !iHTML

X	Internet
<iXML	ALIAS="a name to identify a transaction block "
DECLARATION=""		(xml version="1.0" encoding="UTF-8")
SRC="a string of well formed xml data"
>
Usage	Open an XML session.  i_error_xml is set with any specific errors related to the iXML tags if they occur.  It is important to have a solid understanding of XML to use these tags properly.  The SRC directive can be used to load the xml structure from a variable or just text data.  An XML structure can be loaded a number of ways.  From the iXML tag with SRC=, iXMLFROMFILE tag, iHTTPSESSIONSGETBODY or from a server request into the alias "i_post_xml".  For more examples see the section on "Using XML with iHTML"

Example 1	HTML CODE: 
		ixml.ihtml
<!ihtml>

<iXML ALIAS="test3">

<iXMLFromFile ALIAS="test2" PATH="wishcast.xml">
<iXMLAddTag ALIAS="test2" TAG="Matt" NAME="David" BODY="yes">

<iXMLToFile ALIAS="test2" PATH="wishcast2.xml">

<iXMLAddTag ALIAS="test2" TAG="Matt.David" NAME="Clements" BODY="maybe">

<iXMLToFile ALIAS="test2" PATH="wishcast3.xml">

<iXMLCopy ALIAS="test2" DEST="test3">

<iXMLPost ALIAS="test3" URL="http://www.stepcast.com/wishcast/wishcast.cfm">
<iXMLToFile ALIAS="test3" PATH="wishcast9.xml" outvar="dump">

<iXMLQueryTagExists ALIAS="test2" TAG="Matt.David"><BR>

<iXMLQueryTagBody ALIAS="test2" TAG="Matt"><BR>

<iXMLQuerySubtag ALIAS="test2" TAG="Matt" INDEX="1"><BR>

<iXMLDeleteTagByIndex ALIAS="test2" TAG="Matt.David" INDEX="0">

<iXMLToFile ALIAS="test2" PATH="wishcast4.xml">

<iXMLDeleteTag ALIAS="test2" TAG="Matt.David">

<iXMLToFile ALIAS="test2" PATH="wishcast5.xml">

<iXMLQueryTagAttr ALIAS="test2" TAG="Matt" NAME="name"><BR>

<iXMLAddTagAttr ALIAS="test2" TAG="Matt" NAME="Version" VALUE="?hello?">

<iXMLToFile ALIAS="test2" PATH="wishcast6.xml">

<iXMLDeleteTagAttr ALIAS="test2" TAG="Matt" NAME="Version">

<iXMLDeleteTagAttrByIndex ALIAS="test2" TAG="Matt" INDEX="0">

<iXMLToFile ALIAS="test2" PATH="wishcast7.xml">

<iXMLToFile ALIAS="test3" PATH="wishcast8.xml">

</iXML ALIAS="test2">
</iXML ALIAS="test3">

		wishcast.xml
<?xml version="1.0"?>
<Matt NAME="1.05">
	Testing
</Matt>

Example 2	HTML CODE: 
		ixml.ihtml
<!ihtml>

<iXMLFromFile ALIAS="SlashDot" PATH="slashdot.xml">

<iXMLQueryTagExists ALIAS="SlashDot" TAG="backslash" OUTVAR="exists">
<iIF COND=":exists" ALIAS="outer">

<iXMLQueryTagExists ALIAS="SlashDot" TAG="backslash.story" OUTVAR="exists">
<iWHILE ALIAS="exists">

<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.title" outvar="title">
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.url" outvar="url">
<b><a href=:url>:title</a></b><br>
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.time"><br>
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.author"><br>
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.department"><br>
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.topic"><br>
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.comments"><br>
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.section"><br>
<iXMLQueryTagBody ALIAS="SlashDot" TAG="backslash.story.image"><br>
<iXMLDeleteTag ALIAS="SlashDot" TAG="backslash.story">
<iXMLQueryTagExists ALIAS="SlashDot" TAG="backslash.story" OUTVAR="exists">

</iWHILE ALIAS="exists">

</iIF ALIAS="outer">

Example 3	HTML CODE: 
		ixmlsoap.ihtml
<!ihtml>

<iXML ALIAS="soap">

<iXMLAddTag ALIAS="soap" TAG="" NAME="SOAP-ENV:Envelope" BODY="x">
<iXMLAddTagAttr ALIAS="soap" TAG="SOAP-ENV:Envelope" NAME="xmlns:SOAP-ENV" VALUE="http://schemas.xmlsoap.org/soap/envelope/">
<iXMLAddTagAttr ALIAS="soap" TAG="SOAP-ENV:Envelope" NAME="SOAP-ENV:encodingStyle" VALUE="http://schemas.xmlsoap.org/soap/encoding/">
<iXMLAddTag ALIAS="soap" TAG="SOAP-ENV:Envelope" NAME="SOAP-ENV:Body" BODY="x">
<iXMLAddTag ALIAS="soap" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body" NAME="ZipCodesSoapIn" BODY="x">
<iXMLAddTagAttr ALIAS="soap" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ZipCodesSoapIn" NAME="xmlns:m" VALUE="http://webservices.instantlogic.com/zipcodes.ils">
<iXMLAddTag ALIAS="soap" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ZipCodesSoapIn" NAME="zip" BODY="90210">

<iXMLToFile ALIAS="soap" PATH="longlat.xml">
<iXMLPOST ALIAS="soap" URL="http://webservices.instantlogic.com/zipcodes.ils" SOAP=true>

</iXML ALIAS="soap">

See Also	iXML*

X	Internet
</iXML	ALIAS="a name to identify a transaction block "
>
Usage		Closes the block of XML transaction tags.

See Also	iXML*

X	Internet
<iXMLQUERYTAGEXISTS
	ALIAS="a name to identify a transaction block "
	TAG="name of tag"
>
Usage	Queries an XML transaction block and returns a true value if TAG exists, otherwise a
false value.  This is useful for checking to see if a tag is in the xml before getting the value.  This can be used to see if the xml is in the intended format.  

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLQUERYTAGBODY
	ALIAS="a name to identify a transaction block "
	TAG="name of tag"
>
Usage		Queries an XML transaction block and returns the body of the TAG.  If the TAG does not
		exist, an error occurs.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLQUERYTAGATTR
	ALIAS="a name to identify a transaction block "
	TAG="name of tag"
	NAME="name of attribute"
>
Usage	Queries an XML transaction block for a tag named TAG with an attribute named NAME,
and returns the value of the attribute.  If the tag or the attribute does not exist, an error occurs.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLQUERYSUBTAG
	ALIAS="a name to identify a transaction block "
	TAG="name of tag"
	INDEX="index value"
>
Usage	Queries an XML transaction block and returns the body (content) of a subtag of TAG, at the index given by INDEX.  INDEX values begin at 1, and are used to reference multiple subtags.  If the TAG or subtag does not exist, an error occurs.  If no INDEX is specified (or INDEX="?") then the count of the number of subtags is returned.

This is useful if you do not know the names of the subtags of TAG, and therefore can’t use iXMLQUERYTAGBODY.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLQUERYTAGATTRBYINDEX	
ALIAS="a name to identify a transaction block "
TAG="name of tag"
INDEX="index value"
>
Usage	Queries an XML transaction block for a tag named TAG and an attribute referred to by an INDEX value instead of a name, and returns the attribute’s value.  If the tag or the attribute does not exist, an error occurs.  INDEX starts at 1.  If index is not specified then a count is returned.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLADDTAG	
ALIAS="a name to identify a transaction block "
TAG="name of tag"
NAME="name of new tag"
BODY="body for new tag"
>
Usage	Adds a new tag to an XML transaction block.  The tag named NAME is added as a subtag of TAG, and contains the BODY.  If TAG is not specified, the new tag becomes the root tag.  Be careful not to add two root tags, as this is invalid XML.

	To better understand the nomenclature of XML, the format of a simple XML document is
	<?declaration?>
	<roottag>
	<tagname attributename="attributevalue">tagbodyvalue</tagname>
	</roottag>
	
		In the above, if the ALIAS of the xml structure is XMLALIAS then
		:xmlalias->roottag.tagname

		would return 

		tagbodyvalue

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLADDTAGATTR
	ALIAS="a name to identify a transaction block "
TAG="full name of tag"
NAME="name of attribute"
VALUE="value for attribute"
>
Usage	Adds a new attribute to a tag.  If the TAG does not exist, or the attribute already exists, an error occurs.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLDELETETAG
	ALIAS="a name to identify a transaction block "
	TAG="full name of tag"
>
Usage	Deletes a tag from an XML transaction block.  If the tag does not exist, an error occurs.
		
This can be useful for parsing an XML document.  Eg.
<iSET WhileTrue=”1” i_error=”0”>
<iWHILE ALIAS="WhileTrue">
		<iXMLQueryTagBody ALIAS="xml1" TAG=”person.name” EHANDLE=”quiet”>
		<iIF COND=":i_error" ALIAS="if1">
		<iBREAK>
		</iIF ALIAS=”if1”>
	<iXMLDeleteTag ALIAS=”xml1” TAG=”person.name”>
	</iWHILE ALIAS="WhileTrue">

There are other ways to perform the logic above as well.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLDELETETAGBYINDEX
	ALIAS="a name to identify a transaction block "
	TAG="name of tag"
	INDEX=""
>
Usage	Deletes a subtag from an XML transaction block.  TAG is the parent tag, and INDEX is
the index of the subtag to be deleted.  If the TAG or subtag do not exist, an error occurs.  INDEX starts at 1.

This is useful if you do not know the names of the subtags you wish to delete.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLDELETETAGATTR
	ALIAS="a name to identify a transaction block "
	TAG="name of tag"
	NAME="name of attribute"
>
Usage		Deletes an attribute from a tag.  If the tag or attribute do not exist, an error occurs.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLDELETETAGATTRBYINDEX
	ALIAS="a name to identify a transaction block "
	TAG="name of tag"
	INDEX="attribute index number"
>
Usage	Deletes an attribute from a tag, at the specified INDEX.  If the tag or attribute do not
exist, an error occurs.  INDEX starts at 1.

This is useful if you do not know all the attribute names of a given tag.

See Also	Notes on TAG attribute, iXML*

X	Internet
<iXMLFROMFILE
	ALIAS="a name to identify a transaction block "
	PATH="path and filename to xml file"
>
Usage	Reads an XML document from a file and parses it into an XML transaction block in memory, from here on referenced to by the ALIAS name.  One use of this is to create template XML documents in files and then use this tag to load them into an XML structure without having to use iXMLADDTAG and related tags to create the necessary structure.

See Also	Notes on Paths. IXML*

X	Internet
<iXMLTOFILE
	ALIAS="a name to identify a transaction block "
	SOAP="true | false"						(false)
PATH="path and filename of xml file to create"
[COMPACT="true | false"]					(false)
>
Usage	Writes out an XML transaction block to a file.

The SOAP directive specifies whether to output in SOAP format or not.  The tag will output the XML structure referenced by ALIAS to the file specified in PATH.  COMPACT=true is used to make the XML that is output to be compacted without unneeded spaces and tabs.

SOAP format contains a wrapper around the actual XML document.  It might look something like this as an example

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:trans="http://tempuri.org/message">
<SOAP-ENV:Body>
XML DOCUMENT HERE
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

See Also	Notes on Paths, iXML*

X	Internet
<iXMLPOST
	ALIAS="a name to identify a transaction block "
PARSE="true | false "						(false)
SOAP="true | false"						(false)
SOAPACTION=""
URL="the url to post the XML file to"
[COMPACT="true | false"]					(false)
[ATTACH="name of file to attach"]
[ATTACHTYPE="mimetype of attachment"]
[USERAGENT="user agent name to send"'] (iHTML User Agent)
[TIMEOUT="in seconds"]						(60)
[LOGFILE="file to log to"]
>
Usage	Return value is the response from the server.  The XML transaction block referred to by ALIAS contains the response which should be an XML document.  Use the other XML tags to parse the resulting XML block.  The PARSE directive indicates whether to parse the XML document or not.  The SOAP directive is set to TRUE to post in SOAP format.  The SOAPACTION directive contains the SOAP action to perform.  URL is the web page to POST the XML file to.

	The ATTACH directive can be used to attach an XML file to be sent in the POST.  The ATTACHTYPE is a mime type for the attachment, normally this would be "text/xml".  

	COMPACT=true is used to make the XML that is output to be compacted without unneeded spaces and tabs.

	The TIMEOUT directive sets the amount of time to wait for the data to be sent to the server specified in URL.  USERAGENT can be used to specify a particular user agent such as Mozilla, Netscape, IE or whatever you might need.  

Example	HTML CODE: 
		Ixml4.ihtml
<!ihtml>

<iXML ALIAS="am" DECLARATION='xml version="1.0" encoding="UTF-8"'>

<iXMLAddTag ALIAS="am" TAG="" NAME="SOAP-ENV:Envelope" BODY="">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope" NAME="xmlns:SOAP-ENV" VALUE="http://schemas.xmlsoap.org/soap/envelope/">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope" NAME="SOAP-ENV:encodingStyle" VALUE="http://schemas.xmlsoap.org/soap/encoding/">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope" NAME="xmlns:xsi" VALUE="http://www.w3.org/2001/XMLSchema-instance">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope" NAME="xmlns:xsd" VALUE="http://www.w3.org/2001/XMLSchema">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope" NAME="xmlns:SOAP-ENC" VALUE="http://schemas.xmlsoap.org/soap/encoding/">

<iXMLAddTag ALIAS="am" TAG="SOAP-ENV:Envelope" NAME="SOAP-ENV:Body" BODY="">
<iXMLAddTag ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body" NAME="ns:postDocumentDownloadAck" BODY="">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck" NAME="xmlns:ns" VALUE="nsMerchantDataExchange">

<iXMLADDTAG ALIAS="am" BODY='' TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck" NAME="merchant">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.merchant" NAME="xsi:type" VALUE="ns:Merchant">

<iXMLADDTAG ALIAS="am" BODY='CLIENTNAME' TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.merchant" NAME="merchantName">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.merchant.merchantName" NAME="xsi:type" VALUE="xsd:string">
	
<iXMLADDTAG ALIAS="am" BODY='CLIENTNUMBER' TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.merchant" NAME="merchantIdentifier">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.merchant.merchantIdentifier" NAME="xsi:type" VALUE="ns:MerchantIdentifier">

<iXMLADDTAG ALIAS="am" BODY='' TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck" NAME="documentIdentifierArray">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.documentIdentifierArray" NAME="SOAP-ENC:arrayType" VALUE="ns:DocumentID[1]">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.documentIdentifierArray" NAME="xsi:type" VALUE="ns:DocumentIDArray">

<iXMLADDTAG ALIAS="am" BODY='54636003' TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.documentIdentifierArray" NAME="item">
<iXMLAddTagAttr ALIAS="am" TAG="SOAP-ENV:Envelope.SOAP-ENV:Body.ns:postDocumentDownloadAck.documentIdentifierArray.item" NAME="xsi:type" VALUE="ns:DocumentID">
<iXMLTOFILE ALIAS="am" PATH="theack.xml">
<iXMLPOST ALIAS="am" TIMEOUT="600" PARSE=FALSE SOAP=FALSE compact=true SOAPACTION="nsMerchantDataExchange#postDocumentDownloadAck" URL="http://email%40domain.com:password@merchant-api.amazon.com:80/exec/merchantdata/" OUTVAR="result">

See Also	iXML*

X	Internet
<iXMLCOPY
	ALIAS="a name to identify a transaction block "
DEST="destination alias"
>
Usage	Makes a copy of an XML transaction block from the source ALIAS to the destination alias
of DEST.

See Also	iXML*

X	Internet
<iXMLINSERTAT
	ALIAS="a name to identify a transaction block "
	TAG="tag name"
	NAME=”name of new tag”
	BODY="body of new tag"
	TYPE="normal | exclamation"					(normal)
>
Usage	Adds a new tag with the given NAME and BODY after the one specified by TAG.  If the
TAG does not exist, an error occurs.  

See Also	Notes on TAG attribute, iXML*

X	Internet
<iISEMAIL	SRC="email address to test"						("")
>
Usage	Returns true or false if the SRC is an email address. This only checks the format of the string, it does not actually check the domain validity, nor does it query the mx server to see if the actual account is valid.

Example 1	HTML CODE: 
		iis.ihtml
<!ihtml>
test@inline.net is an email address:
<iISEMAIL SRC="test@inline.net"><br>
somebody@inline is an email address:
<iISEMAIL SRC="somebody@inline.">

See Also	iIS*

X	Internet
<iNSLOOKUP
SERVER="server to query"
		RECURSE=" true|false"						(true)
		TIMEOUT="in seconds"						(30)
		QUERY="A|NS|CNAME|SOA|PTR|HINFO|MX"		(A)
		LINEBREAK="line break string for formatting"		(<br>)
		HOST="string to query on"
>
Usage	Performs NSLOOKUP commands.  SERVER is the name of the name server to use for the lookup.  RECURSE set to true will ask other servers if the one specified is not authoritative.  QUERY is the type of lookup query to perform.  

Example 1	HTML CODE: 
		inslookup.ihtml
<!ihtml>

host: slashdot.org <br>
server: ns2.inline.net
<p>
query a:
<inslookup server="ns2.inline.net" query="a" 
host="slashdot.org"
<p>
query ns:
<inslookup server="ns2.inline.net" query="ns" 
host="slashdot.org">
<p>
query cname:
<inslookup server="ns2.inline.net" query="cname" 
host="slashdot.org">
<p>
query soa:
<inslookup server="ns2.inline.net" query="soa" 
host="slashdot.org">
<p>
query ptr:
<inslookup server="ns2.inline.net" query="ptr" 
host="slashdot.org">
<p>
query hinfo:
<inslookup server="ns2.inline.net" query="hinfo" 
host="slashdot.org">
<p>
query mx:
<inslookup server="ns2.inline.net" query="mx" 
host="slashdot.org">
<p>

See Also	iTELNET, iIP, iCGI, iWHOIS

X	Internet
<iWHOIS	HOST="host of the name server"
	WHO="domain to look up"
	SOURCEIP="ip to use for lookup"
	TIMEOUT="in seconds"						(60)
	TYPE="internic | arin | other"					(internic)
>
Usage		Performs WHOIS type commands to the main Internic/ARIN whois servers.
URL is not used unless TYPE is other.  It should then be the URL to use for the whois.
WHO is the TLD domain to look up.  SOURCEIP is useful if you have more than 1 IP on the server and don't want to get banned by the whois servers for too many lookups.  It sets the IP that the request will come from (it must be assigned to the server of course).  The TIMEOUT setting determines the time to wait for a response. 

Example 1	HTML CODE: 
		iwhois.ihtml
<!ihtml>

<iWHOIS WHO="inline.net" TYPE="internic">

See Also	iTELNET, iFINGER, iNSLOOKUP

X	Internet
<iTOKEN	SRC="a string"
>
Usage	A hash of SRC and other stuff is returned to make a token which can be used as a cookie, session variable or other identifier.  

Example 1	HTML CODE: 
		itoken.ihtml
<!ihtml>
<iTOKEN SRC=':i_ip' OUTVAR="tokenval">

See Also	iMD5

Notes on the iXML TAG Attribute

An XML subtag in your document can be referenced using a dotted notation, which lists all the tags beginning at the root that form a path to the subtag.  Consider the XML file: 

<?xml version=1.0?>
<person>
<name>jack</name>
<name>jill</name>
</person>

The tag “name” can be referenced as “person.name”.  

Index Notation:
This tag name appears twice in this example, and the first match will always be chosen.  To reference another match, specify its index using the following index notation: subtag[index].  Indexes always begin at one.  Eg. The tag containing “jill” is referenced by the tag name person.name[2].

Counting Tags:
A count of tags with a given tag name is returned by the notation tag[?].
Eg. person.name[?] will return 2.

You can also refer to these values using an iHTML colon variable using the format like this (assuming the XML alias is called "xmlaliasname" and using the above XML example.

:xmlaliasname->person.name

You can also set/update a tag in an XML structure by using OUTVAR or the iEQ, iDEFAULT and iSET tags.  For example, you could do 

<iEQ NAME="xmlaliasname->person.name[3]" VALUE="Bob">

Notes on Paths and Filenames

Some possible options for specifying a path and what they mean.

"." - means use either the current directory or file being served as applicable (whether the directive expects a path to a file or a directory)

"./filename.extension"  - use a file with the name specified in the same directory as the page being served.

"filename.extension" - same as above

"/filename.extension" - use the named file from the root of the current disk volume (on windows the current disk volume is where the page being served resides)

"c:/directory/file.extension" - use the named file at the absolute path specified.

"//unc_machine_name/share/relativepath/file.ext" - use the file pointed to on the unc share (windows only). For unix, mount the unc share using linneighbourhood, or by making direct entries in mtab/fstab, and then use the absolute path to the mountpoint combined with the relative path to the file within the share as follows "/path_to_mount_point/mountname/relativepath/filename.ext"

The slash direction is irrelevant and either will work on either operating system.

Doubling up slashes as in c://directory/file.ext has no effect except when part of a unc name as indicated above.

Paths are case sensitive on unix. Paths should not contain spaces ever even though windows allows this, it is a recipe for disaster.

In the above examples file names may have multiple extensions, directory names may also have one or more extensions, directory portions of paths may contain as many subdirectories as necessary, however the overall length should be limited to 256 since operating systems sometimes have trouble with paths exceeding that length. Exceedingly deep directories also have a performance impact since many more lookups in directories have to be performed before the actual data desired is located on disk.