Exported Functions

WebRainbow Version 1.5 exposes 34 functions to Visual Basic:


WebRainbow Version 1.5 exposes 26 special Constants used for its functions to Visual Basic:


Function Description

 

AddUrlData

Add one pair of data, in name=value format, into Url string for redirecting.

Method of WebRainbow.DynaPage

Systax

  • Sub AddUrlData( sName As String, [sValue As String] )

Where

  • The required argument sName is any valid text string expression

  • The optional argument sValue is any valid string expression

Remarks

  • If sName is NULL, AddUrlData does nothing.

  • The special character, defined in HTTP specification, should not be included in sName. If there are any such character(s) needed, do the Url Encoding for sName first before calling to AddUrlData.

  • AddUrlData will do url-encoding for sValue automatically.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

  • AddUrlData is not supported by v1.0 & v1.1.

 

Chr2Hex

Encode ascii string to %XX encoded string.

Method of WebRainbow.DynaPage

Systax

  • Function Chr2Hex ( [sString As String], [sSpecialChar As String] ) As String

Where

  • The required argument sString is any valid string expression representing a string for encoding.

  • The required argument sSpecialChar is any valid string expression specifying the characters needed to be encoded.

Constants

Remarks

  • Using HexEncode instead of this function is strongly recommand for more functionality in the future.

  • If the value of argument sString is not given, Chr2Hex returns empty string.

  • If the value of argument sSpecialChar is not given, Chr2Hex only converts %, the default special character for Chr2Hex, to %XX.

  • If the value of argument sSpecialChar is given, Chr2Hex will appending given special characters to its default special character %.

  • If ecUrlEncode is used for argument sSpecialChar, Chr2Hex will do url-encoding.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

CountCookie

Get number of received cookie(s)

Method of WebRainbow.DynaPage

Systax

  • Function CountCookie( [sName As String] ) As Long

Where

  • The optional argument sName is any valid string expression.

Remarks

  • If sName is not specified, CountCookie returns total number of received cookies, otherwise, returns total number of specified cookies received.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

CountFormData

Get number of received Form data

Method of WebRainbow.DynaPage

Systax

  • Function CountFormData( [sName As String] ) As Long

Where

  • The optional argument sName is any valid string expression.

Remarks

  • If sName is not specified, function returns total number of received Form data, otherwise, returns total number of specified Form data received.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

CountUploadFiles

Returns the total of uploaded files.
Method of WebRainbow.DynaPage

Systax

  • Function CountUploadFiles() As Long

Remarks

  • If the returned value is 0, then there is no valid file received.

 

CPrint

Send HTML / text or binary content to browser

Method of WebRainbow.DynaPage

Systax

  • Sub CPrint( sString As String )

Where

  • The required argument sString is any valid string expression

Remarks

  • By defaulf, CPrint send HTML or text content to browser. If there are binary contents to be sent, the SetCgiHeader, along with an appropriate content-type, should be called before the first call to CPrint.

  • CPrint could be only used for sending HTML or text content for v1.0 & v1.1.

  • When HTML file is merged into Visual Basic code, you can use two double quote "" to replaced the double quote ". For example:
          <BODY BACKGROUND="images/bgyelo01.gif">
    can be rewritten with CPrint:
          CPrint "<BODY BACKGROUND=""images/bgyelo01.gif"">"
    The Visual Basic will put one double quote " at the place of two double quote " in the string.

 

FlushBuffer

Force web server to send bufferred content to browser.

Method of WebRainbow.DynaPage

Systax

  • Sub FlushBuffer()

Remarks

  • This is not supported by v1.0 & v1.1

 

GetCgiEnvironment

Retrieving CGI Environment value corresponding to given CGI Environment name

Method of WebRainbow.DynaPage

Systax

  • Function GetCgiEnvironment ( sName As String ) As String

Where

  • The required argument sName is a string expression of CGI Environment Variable.

Constants

  • In WRHttpHeaderStatus.EnvConst, there are 59 pre-defined Constants for CGI Environment Variables can be used for GetCgiEnvironment, Click on cgienv.html to see the details.

Remarks

  • If the value of argument sName is not given, GetCgiEnvironment returns empty string.

  • For given value of argument sName, if there is no match found in CGI Environment, GetCgiEnvironment returns empty string.

  • Using WebRainbow pre-defined CGI Environment Constant for GetCgiEnvironment is recommended.

 

GetCookie

Retrieve one cookie

Method of WebRainbow.DynaPage

Systax

  • Function GetCookie( [sName As String], [sID As String], [sField As String] ) As String

Where

  • The optional argument sName is any valid string expression.

  • The optional argument sID is a string expression which contents digit(s) only.

  • The optional argument sField is a string expression of "0", "1", "2", or "3", see Values bellow for details.

Values

  • 0 -- Value of received cookie
  • 1 -- Path attribute of received cookie
  • 2 -- Domain attribute of received cookie
  • 3 -- Port attribute of received cookie

Constants

  • In WebRainbow.Cookie there are 4 pre-defined cookie field Constants can be used for GetCookie only:

Remarks

  • GetCookie can be used for retrieving either Netscape Cookie or SetCookie2 Cookie. Note: Netscape Cookie only has Value field associated with it, while SetCookie2 has 4 fields: Value, Path, Domain, Port.

  • If only sName is specified, GetCookie will return the first found value for given sName

  • If both sName and sID are specified, GetCookie will return the exact value for given sName and sID

  • If the given value of sID is large than the number of cookie with the given sName, GetCookie will return empty string

  • If the value of sID is invalid, GetCookie will return the first found value for given sName

  • If sField is specified as other than to retrieve Value of the cookie:
    • Empty string will be returned for Netscpate Cookie.
    • Exact received value for that field will be returned for SetCookie2 Cookie

  • If sName is not specified:
    • If there are some cookie(s) received, GetCookie will return the whole cookie string retrieved from CGI Environment Variable COOKIE
    • If there is no any cookie received, empty string will be returned

  • When you retrieve Value of the cookie, if it is URL encoded, please use function Hex2Chr provided by WebRainbow to decode it.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it.

 

GetCookieVersion

Retrieve received or browser supported cookie version

Method of WebRainbow.DynaPage

Systax

  • Function GetCookieVersion( [sReceiveOrSupport As String] ) As Long

Where

  • The optional argument sReceiveOrSupport is a string expression of "0" or "1", see Values for details.

Values

  • 0 -- Request for version of received cookie

  • 1 -- Request for browser supported cookie version

Constants

  • In WebRainbow.Cookie there are 2 pre-defined cookie field Constants can be used for GetCookieVersion only:

Remarks

  • If sReceiveOrSupport is not specified, GetCookieVersion returns the version of received cookies.

  • If the value of sReceiveOrSupport is not "0" or "1", GetCookieVersion returns the version of received cookies.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

GetFormData

Retrieve Form Data, for both GET and POST

Method of WebRainbow.DynaPage

Systax

  • Function GetFormData( [sName As String], [sID As String] ) As String

Where

  • The optional argument sName is any valid string expression.

  • The optional argument sID is a valid string expression which contents digit(s) only.

Remarks

  • If only sName is specified, GetFormData will return the first found value for given sName

  • If both sName and sID are specified, GetFormData will return the exact value for given sName and sID

  • The value of sID starts from 1, if the value of sID is set to 0, an empty string will be returned

  • if the given value of sID is large than the number of data pair with the given sName, GetFormData will return empty string

  • If sName is not specified:
    • If there are some HTML FORM data received, GetFormData will return the original string of received FORM data
    • If there is no any HTML FORM data received, empty string will be returned

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

GetRetrievedContentLength

Returns the real total bytes read in for POSTed data

Method of WebRainbow.DynaPage

Systax

  • Function GetRetrievedContentLength() As Long

Remarks

  • The value returned by GetRetrievedContentLength is in bytes.

 

GetUploadFileName

Returns the uploaded file name which specified by index.

Method of WebRainbow.DynaPage

Systax

  • Function GetUploadFileName( sID As String ) As String

Where

  • The required argument sID is a valid string expression which contents digit(s) only.

Remarks

  • The sID must be equal to or larger than 0, and less than total of uploaded files.

 

GetUploadFileSize

Returns the uploaded file size which specified by index.

Method of WebRainbow.DynaPage

Systax

  • Function GetUploadFileSize( sID As String ) As Long

Where

  • The required argument sID is a valid string expression which contents digit(s) only.

Remarks

  • The sID must be equal to or larger than 0, and less than total of uploaded files.

  • The returned file size is in bytes.

 

GetUploadFileType

Returns the uploaded file type in MIME format.

Method of WebRainbow.DynaPage

Systax

  • Function GetUploadFileType(sID As String) As String

Where

  • The required argument sID is a valid string expression which contents digit(s) only.

Remarks

  • The sID must be equal to or larger than 0, and less than total of uploaded files.

  • The returned file type is in MIME format.

 

Hex2Chr

Converting URL encoded %XX string back to a normal string

Method of WebRainbow.DynaPage

Systax

  • Function Hex2Chr ( [sString As String] ) As String

Where

  • The optional argument sString is any valid string expression to be decoded.

Remarks

  • Using HexDecode instead of this function is strongly recommand for more functionality.

  • If the value of argument sString is not given, Hex2Chr returns empty string.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

HexDecode

Decode %XX encoded string back to an ascii string.

Method of WebRainbow.DynaPage

Systax

  • Function HexDecode( [sString As String], [sDecoding As String] ) As String

Where

  • The optional argument sString is any valid string expression to be encoded.

  • The optional argument sDecoding is a string expression of "1" to let WebRainbow do url-decode.

Constants

  • In WebRainbow.DynaPageProperty, there is a pre-defined constants ecUrlDecode can be used for sDecoding.

Remarks

  • If the value of argument sString is not given, HexDecode returns empty string.

  • If ecUrlDecode is used for sDecoding, HexDecode will do url-decoding.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

HexEncode

Encode ascii string to %XX encoded string.

Method of WebRainbow.DynaPage

Systax

  • Function HexEncode( [sString As String], [sSpecialChar As String] ) As String

Where

  • The required argument sString is any valid string expression representing a string for encoding.

  • The required argument sSpecialChar is any valid string expression specifying the characters needed to be encoded.

Constants

Remarks

  • If the value of argument sString is not given, HexEncode returns empty string.

  • If the value of argument sSpecialChar is not given, HexEncode only converts %, the default special character for HexEncode, to %XX.

  • If the value of argument sSpecialChar is given, HexEncode will appending given special characters to its default special character %.

  • If ecUrlEncode is used for argument sSpecialChar, HexEncode will do url-encoding.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

Redirect

Redirect to another URL.

Method of WebRainbow.DynaPage

Systax

  • Sub Redirect ( sURL As String, [sStatusCode As String], [sMsg As String], [sWithData As String] )

Where

  • The required argument sURL is a valid string expression representing the new URL.

  • The optional argument sStatusCode is a string expression containing digits only to represent HTTP Status Code.

  • The optional argument sMsg is any valid string expression to tell user what's happened.

  • The optional argument sWithData is a valid string expression containing only "0", "1", "2", or "3" to tell WebRainbow how to deal with received form data as well as the additional data added by AddUrlData.

Constants

Remarks

  • If the value of argument sURL is not given, Redirect will ignore the redirection request.

  • If sStatusCode is not specified, "302 Moved Temporarily" will be used.

  • If sMsg is not given, no message will be sent to user automatically. But you can use function SendMessage to give detailed message to user.

  • After Redirect is called successfully, no more HTTP / CGI extension Header(s) can be sent.

  • After Redirect is called successfully, only function SendMessage can be called to send more message to user.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

SaveUploadFileAs

Save the specified uploaded file with given file name and path.

Member of WebRainbow.DynaPage

Systax

  • Function SaveUploadFileAs( sID As String, sNewName As String ) As Long

Where

  • The required argument sID is a valid string expression which contents digit(s) only.

  • The required argument sNewName is a valid string expression.

Remarks

  • The sID must be equal to or larger than 0, and less than total of uploaded files.

  • The sNewName must be valid file name.

  • If error accurs, the return value will be less than 0.

 

SendFile

Send one file to browser.

Method of WebRainbow.DynaPage

Systax

  • Function SendFile ( sFilePathName As String, sTypeSelect As String, sContentType As String, sContentLength As String ) As Long

Where

  • The required argument sFilePathName is any valid string expression of path & name of an HTML file.

  • The required argument sTypeSelect is a string expression of "1" or "2", see Values for details.

  • The required argument sContentType is any valid string expression representing the valid MIME entry.

  • The required argument sContentLength is a string expression with digit(s) only.

Values

  • 1 -- Let WebRainbow select proper Content Type based on file extension

  • 2 -- Force WebRainbow to use given Content Type

Constants

  • In WRMimeConstants.ContentType, there are 299 pre-defined MIME (Content Type) Constants can be used for sContentType, Click on mime.html for details.

Remarks

  • SendFile can be called only one time per instance.

  • Using WebRainbow pre-defined MIME (Content Type) Constants for SendFile is recommended.

  • For sTypeSelect = "1", the value of sContentType will be the default Content Type, used in the case of no proper Content Type matching file's extension.

  • sContentLength is not really used to determine the file size, that is you can just put a dummy value there.

 

SendHtmlFile

Send html file to browser.

Method of WebRainbow.DynaPage

Systax

  • Function SendHtmlFile ( sFilePathName As String ) As Long

Where

  • The required argument sFilePathName is any valid string expression of path & name of an HTML file.

Remarks

  • sFilePathName is case sensitive.

  • SendHtmlFile is very useful for sending multiple partial HTML files to create one complete HTML page.

  • Between several partial HTML files, CPrint can be called to send dynamic portion.

 

SendMessage

Send status message to browser.

Method of WebRainbow.DynaPage

Systax

  • Sub SendMessage ( sMessage As String )

Where

  • The required argument sMessage is any valid string expression used to tell user what's happened.

Remarks

  • SendMessage can be called no more than 20 times. When this maximum number reached, all further calls to SendMessage will be discarded.

  • All messages should be in HTML format.

 

SetCgiHeader

Set CGI Header (Status Code, Content Type, Location).

Method of WebRainbow.DynaPage

Systax

  • Sub SetCgiHeader ( [sStatusCode As String], [sContentType As String], [sLocation As String] )

Where

  • The optional argument sStatusCode is a string expression containing digits only to represent HTTP Status Code.

  • The optional argument sContentType is any valid string expression representing the valid MIME entry.

  • The optional argument sLocation is any valid string expression representing the URL.

Constants

  • In WRHttpHeaderStatus.StatusCode, there are 41 pre-defined HTTP Status Code Constants can be used for SetCgiHeader, Click on status.html for details.

  • In WRMimeConstants.ContentType, there are 299 pre-defined MIME (Content Type) Constants can be used for SetCgiHeader, Click on mime.html for details.

Remarks

  • WebRainbow always check for consistence of CGI Headers, and makes necessary correction based on Status Code automatically.

  • If the values of all these 3 optional arguments are not given, WebRainbow will set the CGI Headers to the default value.

  • Calls to CPrint, Redirect, SendHtmlFile, SendFile, SendMessage will cause WebRainbow to call SetCgiHeader automatically with default values if CGI Header have not been set.

  • If using Non-Parsed Header (nph) output, call SetCgiHeader will results in sending all buffered HTTP Response Header to browser and WebRainbow will switch to HTML contents sending.

  • After SetCgiHeader is called successfully, WebRainbow will switch to HTML contents sending.

  • Using WebRainbow pre-defined HTTP Status Code Constants and MIME (Content Type) Constants for SetCgiHeader is recommended.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it.

 

SetContentLength

Set maximum buffer size for received contents, including both form-data and uploaded files.

Method of WebRainbow.DynaPage

Systax

  • Sub SetContentLength( sMaxSize As String )

Where

  • The required argument sMaxSize is a string expression containing digits only to represent the maximun buffer size, in (K).

Constants

  • In WebRainbow.DynaPageProperty there is one pre-defined Constant clRetrieveAllData = "0" can be used for SetContentLength to let WebRainbow accept all incoming data

Remarks

  • It is optional for the application to specify maximum buffer size for received contents.

  • WebRainbow will set buffer size to given size specified in SetContentLength if it is called, or set to the default size of 10 (K) if this maximum buffer size is not specified.

  • The default value of maximum buffer size defined by WebRainbow is 10 (K).

 

SetCookie

Send Cookie to browser, can be used for either Netscape Cookie or SetCookie2 Cookie

Method of WebRainbow.DynaPage

Systax

  • Sub SetCookie( sName As String, sValue As String, [sExpires As String], [sDomain As String], [sPath As String], [sSecure As String], [sComment As String], [sCommentURL As String], [sDiscard As String], [sPort As String], [sVersion As String] )

Where

  • The required argument sName is any valid string expression.

  • The required argument sValue is any valid string expression.

  • The optional argument sExpires is a string expression for seconds the cookie expires, including digit(s) only.

  • The optional argument sDomain is any valid string expression.

  • The optional argument sPath is any valid string expression.

  • The optional argument sSecure is a string expression of either "0" or "1", see Values section bellow for details.

  • The optional argument sComment is any valid string expression.

  • The optional argument sCommentURL is any valid string expression.

  • The optional argument sDiscard is a string expression of either "0" or "1", see Values section bellow for details.

  • The optional argument sPort is a string expression which includes digit(s) only.

  • The optional argument sVersion is a string expression of either "0" or "1", see Values section bellow for details.

Values

  • sSecure:
    • 0 -- Not secure
    • 1 -- Secure

    sDiscard:

    • 0 -- Not discard
    • 1 -- Discard

    sVersion:

    • 0 -- Netscape Cookie
    • 1 -- SetCookie2 Cookie (Version 1 Cookie which uses SetCookie2 to send cookie)

Constants

  • In WebRainbow.Cookie there are 6 pre-defined cookie field Constants can be used for SetCookie only:
Remarks

  • SetCookie will select either SetCookie or Set-Cookie2 request header automatically based on browser's supported cookie version, regardless of the arguments passed to SetCookie. Therefor WebRainbow guaranties the cookie can be accepted by browser.

  • If the value of argument sValue contains certain special characters, such as Tab, Space, Semicolon, comma, or the other character that should be encoded by URL encoding, please first encode them using function Chr2Hex provided by WebRainbow before pass sValue to SetCookie.

  • WebRainbow defined a constant ceEncodeChar for such URL-encoding special to cookie.

  • The value for argument sExpires should be in seconds, for example: "86400" for 24 hours, WebRainbow will convert it to appropriate format for the cookie.

  • If using Non-Parsed Header (nph) output, WebRainbow will buffer the sending cookie(s) until SetCgiHeader is called successfully.

  • After SetCgiHeader is called successfully, no more cookie(s) can be sent.

  • Using pre-defined cookie field constants is recommended.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

SetExtHeader

Set an HTTP or CGI extension header field.

Method of WebRainbow.DynaPage

Systax

  • Sub SetExtHeader ( sExtHeaderName As String, sExtHeaderValue As String )

Where

  • The required argument sExtHeaderName is a string expression for HTTP or CGI extension Header Field Name.

  • The required argument sExtHeaderValue is any valid string expression.

Remarks

  • If the value of argument sExtHeaderName or sExtHeaderValue is not given, SetExtHeader does not set HTTP / CGI extension Header.

  • If using Non-Parsed Header (nph) output, WebRainbow will buffer these HTTP / CGI extension Headers until SetCgiHeader is called successfully.

  • After SetCgiHeader is called successfully, no more HTTP / CGI extension Header(s) can be sent.

 

SetHttpHeader

Set an HTTP Header entry (general-header, response-header, entity-header).
Member of WebRainbow.DynaPage

Systax

  • Sub SetHttpHeader ( sHeaderName As String, sHeaderValue As String )

Where

  • The required argument sHeaderName is a string expression containing digit(s) only to represent HTTP Response Related Header Field Name.

  • The required argument sHeaderValue is any valid string expression.

Constants

  • In WRHttpHeaderStatus.ResponseHeader, there are 30 pre-defined HTTP Response Related Header Field Name Constants can be used for SetHttpHeader, Click on header.html to see the details.

Remarks

  • If the value of argument sHeaderName or sHeaderValue is not given, SetHttpHeader does not set HTTP Response Header.

  • If the value of argument sHeaderName is not correct, SetHttpHeader does not set HTTP Response Header.

  • If using Non-Parsed Header (nph) output, WebRainbow will buffer these HTTP Response Headers until SetCgiHeader is called successfully.

  • After SetCgiHeader is called successfully, no more HTTP Response Header(s) can be sent.

  • Using WebRainbow pre-defined HTTP Response Related Header Field Name Constant for SetHttpHeader is recommended.

 

SetMaxFormDataForFileUpload

Set the maximum size allowed for POSTed form-data during file uploading.

Member of WebRainbow.DynaPage. Default is 10 K.

Systax

  • Sub SetMaxFormDataForFileUpload( sMaxSize As String )

Where

  • The required argument sMaxSize is a string expression containing digit(s) only to represent the maximum size of form-data.

Remarks

  • It is optional for the application to call SetMaxFormDataForFileUpload to dealing with file uploading.

  • The value of argument sMaxSize represents the data size in K, not bytes

  • WebRainbow will process form-data totally to the maximum size defined.

  • If the application does not call this function before processing the file uploading, the default value of maximum size of form-data will be used during processing file uploading.

  • The default value ofmaximum size allowed for POSTed form-data during file uploading defined by WebRainbow is 10 (K).

 

SetMaxUploadFiles

Set the maximum number of uploaded files.

Member of WebRainbow.DynaPage. Default is 10 files.

Systax

  • Sub SetMaxUploadFiles( sMaxUploadFiles As String )

Where

  • The required argument sMaxUploadFiles is a string expression containing digit(s) only to represent the maximum number of uploaded files.

Remarks

  • It is optional for the application to call SetMaxUploadFiles to dealing with file uploading.

  • WebRainbow will process uploaded files totally to the maximum number of uploaded files.

  • If the application does not call this function before processing the file uploading, the default value of maximum number of uploaded files will be used.

  • The default value of maximum number of uploaded files defined by WebRainbow is 10.

 

SetRequestMethod

Set HTTP request method used for HTML FORM: GET, POST. Default is POST.
Set maximum memory space for FORM data, except uploaded files. Default is 10K bytes.

Method of WebRainbow.DynaPage

Systax

  • Sub SetRequestMethod( [sMethod As String], [sMaxDataSize As String] )

Where

  • The optional argument sMethod is a string expression of "0", "1", or "2", see Values bellow for details.

  • The optional argument sMaxDataSize is a string expression which includes digit(s) only.

Values

  • 0 -- Accepts only POST with Content_Type = application/x-www-form-urlencoded
  • 1 -- Accepts both GET and POST (current only for Content_Type = application/x-www-form-urlencoded)
  • 2 -- Accepts GET only

Constants

  • In WebRainbow.RequestMethod there are 3 pre-defined HTTP Request Method Constants can be used for SetRequestMethod only:

Remarks

  • If sMethod is not specified, SetRequestMethod will set HTTP Request Method to POST with application/x-www-form-urlencoded.

  • If sMaxDataSize is not specified, SetRequestMethod will set memory space to default value of 10K.

  • The value used for sMaxDataSize is in K, if will be multiplied by 1024 automatically by WebRainbow.

  • The memory space defined by sMaxDataSize is not used for uploaded files, it is used only for buffering the received data for HTML FORM.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it.

 

SetTempDirectory

Set temporary directory used for holding the uploaded file(s) temporarily during file uploading process.

Member of WebRainbow.DynaPage

Systax

  • Sub SetTempDirectory( sTempDir As String )

Where

  • The required argument sTempDir is any valid string expression to represent the directory.

Remarks

  • It is optional for the application to call SetMaxUploadFiles to dealing with file uploading.

  • WebRainbow will process uploaded files totally to the maximum number of uploaded files.

  • If the application does not call this function before processing the file uploading, WebRainbow will hold the uploaded file(s) in the current directory temporarily during file uploading process.

  • WebRainbow will delete the uploaded file(s) in temporary directory after the file(s) saved.

 

SetUrlTransfer

Set method of transferring data through URL.

Method of WebRainbow.DynaPage

Systax

  • Sub SetUrlTransfer( [sWithData As String] )

Where

  • The optional argument sWithData is a valid string expression containing only "0", "1", "2", or "3" to tell WebRainbow how to deal with received form data as well as the additional data added by AddUrlData.

Constants

Remarks

  • If the value of sWithData is not given, SetUrlTransfer set Url transfer method to default value rdWithNoData.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it

 

SpecityContentType

Specify the acceptable Content-Type of HTTP POSTed data.

Method of WebRainbow.DynaPage

Systax

  • Sub SpecityContentType( [sContentType As String] )

Where

  • The optional argument sContentType is any valid string expression representing the valid MIME entry.

Constants

  • In WRMimeConstants.ContentType, there are 299 pre-defined MIME (Content Type) Constants can be used for SpecityContentType, Click on mime.html for details.

  • In WRMimeConstants.ContentType, there is a pre-defined special Constant ctWebRainbowAcceptAllContentType can be used for SpecityContentType to make WebRainbow accept all Content-Type, Click on mime.html for details.

Remarks

  • If sContentType is not specified, WebRainbow will default to accept application/x-www-form-urlencoded Content-Type for HTTP POST Method.

  • Using WebRainbow pre-defined HTTP Status Code Constants and MIME (Content Type) Constants for SpecityContentType is recommended.

  • If ctWebRainbowAcceptAllContentType is used for SpecityContentType, WebRainbow will automatically retrieve POSTed data for application/x-www-form-urlencoded and multipart/form-data, and all other content type will be retrieved as binary data.

  • For Visual Basic 4 32-bit Version, vbNullString should be used in the place of optional argument if there is no value assigned to it.

  • This is not supported by v1.0, v1.1 & 1.2

Constant Description

 

hmPOST

WebRainbow is forced to accept only POST with Content_Type = application/x-www-form-urlencoded

Member of WebRainbow.RequestMethod

Definition

  • Const hmPOST = "0"

Remarks


 

hmAuto

WebRainbow is allowed to accept both GET and POST for HTML FORM

Member of WebRainbow.RequestMethod

Definition

  • Const hmAuto = "1"

Remarks


 

hmGET

WebRainbow is forced to accept GET only

Member of WebRainbow.RequestMethod

Definition

  • Const hmGET = "2"

Remarks


 

clRetrieveAllData

Let WebRainbow process all of POSTed data passed through web server

Member of WebRainbow.DynaPageProperty

Definition

  • Const clRetrieveAllData = "0"

Remarks


 

ceEncodeChar

Let HexEncode and Chr2Hex to encode the special characters for NetScape cookie: space, tab, double quote, comma, semicolon.

Member of WebRainbow.DynaPageProperty

Definition

  • Const ceEncodeChar = Chr$(20) & Chr$(9) & Chr$(34) & Chr$(44) & Chr$(59)
    These special characters are: space, tab, double quote, comma, semicolon, defined in the Netscape Cookie specification

Remarks

  • This constant is used as the value of sSpecialChar in the function HexEncode and Chr2Hex only.

 

crValue

Value of received cookie

Member of WebRainbow.Cookie

Definition

  • Const crValue = "0"

Remarks


 

crPath

Path attribute of received cookie

Member of WebRainbow.Cookie

Definition

  • Const crPath = "1"

Remarks


 

crDomain

Domain attribute of received cookie

Member of WebRainbow.Cookie

Definition

  • Const crDomain = "2"

Remarks


 

crPort

Port attribute of received cookie

Member of WebRainbow.Cookie

Definition

  • Const crPort = "3"

Remarks


 

csNoSecure

Secure attribute of Set-Cookie and Set-Cookie2

Member of WebRainbow.Cookie

Definition

  • Const csNoSecure = "0"

Remarks


 

csSecure

Secure attribute of Set-Cookie and Set-Cookie2

Member of WebRainbow.Cookie

Definition

  • Const csSecure = "1"

Remarks


 

csNoDiscard

Discard attribute of Set-Cookie2

Member of WebRainbow.Cookie

Definition

  • Const csNoDiscard = "0"

Remarks


 

csDiscard

Discard attribute of Set-Cookie2

Member of WebRainbow.Cookie

Definition

  • Const csDiscard = "1"

Remarks


 

csNetscapeCookie

Version attribute of Set-Cookie2

Member of WebRainbow.Cookie

Definition

  • Const csNetscapeCookie = "0"

Remarks


 

csVersion1

Version attribute of Set-Cookie2

Member of WebRainbow.Cookie

Definition

  • Const csVersion1 = "1"

Remarks


 

cvReceived

Version of received cookie

Member of WebRainbow.Cookie

Definition

  • Const cvReceived = "0"

Remarks


 

cvSupported

Browser supported cookie version

Member of WebRainbow.Cookie

Definition

  • Const cvSupported = "1"

Remarks


 

ctAutoTypeSelect

Let WebRainbow select proper Content Type based on file extension

Member of WebRainbow.DynaPageProperty

Definition

  • Const ctAutoTypeSelect = "1"

Remarks

  • This constant is used for SendFile only

 

ctUseGivenType

Force WebRainbow to use given Content Type

Member of WebRainbow.DynaPageProperty

Definition

  • Const ctUseGivenType = "2"

Remarks

  • This constant is used for SendFile only

 

ecCookieSpecial

Let HexEncode and Chr2Hex to encode the special characters for NetScape cookie: space, tab, double quote, comma, semicolon.

Member of WebRainbow.DynaPageProperty

Definition

  • Const ecCookieSpecial = Chr$(20) & Chr$(9) & Chr$(34) & Chr$(44) & Chr$(59)
    These special characters are: space, tab, double quote, comma, semicolon, defined in the Netscape Cookie specification

Remarks

  • This constant is used as the value of sSpecialChar in the function HexEncode and Chr2Hex only.

 

ecUrlDecode

Let HexDecode do url-decoding.

Member of WebRainbow.DynaPageProperty

Definition

  • Const ecUrlDecode = "1"

Remarks

  • This constant is used as the value of sDecoding in the function HexDecode only.

 

ecUrlEncode

Let HexEncode and Chr2Hex do url-encoding.

Member of WebRainbow.DynaPageProperty

Definition

  • Const ecUrlEncode = "11"

Remarks

  • This constant is used as the value of sSpecialChar in the function HexEncode and Chr2Hex only.

 

rdWithNoData

Let WebRainbow transfer the request to another page without any data.

Member of WebRainbow.DynaPageProperty

Definition

  • Const rdWithNoData = "0"

Remarks


 

rdWithFormData

Let WebRainbow transfer the request to another page along with received form data only.

Member of WebRainbow.DynaPageProperty

Definition

  • Const rdWithFormData = "1"

Remarks


 

rdWithAddedData

Let WebRainbow transfer the request to another page along with additional data added by AddUrlData

Member of WebRainbow.DynaPageProperty

Definition

  • Const rdWithAddedData = "2"

Remarks


 

rdWithAllData

Let WebRainbow transfer the request to another page along with both received form data and additional data added by AddUrlData

Member of WebRainbow.DynaPageProperty

Definition

  • Const rdWithAllData = "3"

Remarks


For the latest information on WebRainbow, please see:
http://www.dmfsys.com/wrainbow/

For questions / comments please email to:
support@dmfsys.com


Copyright © 2000 - 2005, D.M.F. Systems, Corporation. All rights reserved.

Last modified on March 2, 2005