|
CGI Class
Has Constructor: NO, Can Create Instance: NO
Can Subclass: NO
The CGI object is used to access information and interact with a web server when bOSL is run as a CGI. A intrinsic instance of CGI is created automatically when the script is run as a CGI. You do not have to create an instance.
See Also: File,GetFile
GetCookie
Syntax: CGI.GetCookie(ckName as string) as string
Returns the value of a cookie with name ckName as a string.
SetCookie
Syntax: CGI.SetCookie(aName as String, aValue as String, [aPath] as String, [aExpire] as float, [aDomain] as string)
Use to create a cookie.
SetHeader
Syntax: CGI.SetHeader(aKey as String, aValue as String)
Adds or changes a HTTP header.
GetParameterValue
Syntax: CGI.GetParameterValue(key as string)
Returns a value of a GET or POST parameter named key.
GetParameterCount
Syntax: CGI.GetParameterCount() as integer
Returns the number of POST or GET parameters received.
GetParameterKey
Syntax: CGI.GetParameterKey(index as Integer) as string
Gets the name of a POST or GET parameter at the given index. The index starts at zero.
Sample Code
Write
Syntax: CGI.Write(aString as string)
Writes to the output buffer. If output is not buffered http headers will be sent the first time output is send.
Sample Code
WriteLine
Syntax: CGI.WriteLine(aString as string)
Writes a line to the output buffer. The end of line sequence of the host operating system is used. If output is not buffered http headers will be sent the first time output is send.
Sample Code
dim f as file,s as sound
//Gets the current folder
f = getfile("")
//Opens the sound temp.snd in a folder named Sounds
//in the current folder
f = f.child("Sounds").child("temp.snd")
//Opens the sound and plays it
s = f.OpenAsSound
s.play
|