Availability
$WBPOSTURL is available for use with all WBSP commands.
Syntax
$WBPOSTURL{URL|PostData|FullPage|ContentType|SoapAction|Options|Headers}
$WBPOSTURL[URL|PostData|FullPage|ContentType|SoapAction|Options|Headers]
Parameters
URL - The Internet address of the resource (page, file)
you want to include in your page. It can be either absolute (containing entire
address including protocol, server, path and resource) or relative (to document
root of virtual server if it starts with slash / character, or to the directory
where the WBSP file is located).
PostData - data to be
posted in format var1=value 1&var2=
value 2&...&varn= value n for ordinary POST
or as XML
for SOAP.
FullPage - optional parameter. If
set to true (T) function will return entire page code without truncating code outside <body>
and </body> tags.
ContentType - optional parameter.
Sets the Content-Type clause in HTTP request header. If omitted
WhizBase will send the default value
application/x-www-form-urlencoded
SoapAction - optional parameter. Sets
the SOAPAction clause in HTTP request header for web services. If omitted
no default value will be sent.
Options - optional parameter. Contains
comma-separated list of ServerXMLHTTP options in form
optionnumber=optionvalue.
Headers - optional parameter. Contains
comma-separated list of ServerXMLHTTP request headers in form
headername=
headervalue
Returns
Source code of the
received page/file. If source code contains <body> and </body> tags
and FullPage is not set to true, function will include only the source code
between these tags.
Example
File PostCookiesA.wbsp
File SetCookieA.wbsp
File ChangeCss.wbsp
File style1.css
File style2.css
After running this example (file postcookiesa.wbsp) the page will change its appearance depending on value of cookie named CSS (if it exists) or depending on a value of user defined variable Style in file /default.inc, or if neither of those two exists, it will use file style1.css. When you click the either of buttons ("Style 1" and "Style 2") it will set the cookie to selected value, call the file changecss.wbsp (with selected value as parameter named CSS) using $WBPOSTURL function, and write new value to file /default.inc as user-defined variable "Style".