$WBGETURL - get data from URL (GET method)

Availability
$WBGETURL is available for use with all WBSP commands.

Syntax
$WBGETURL{URL|FullPage}
$WBGETURL[URL|FullPage]

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).
FullPage - optional parameter. If set to true (T) function will return entire page code without truncating code outside <body> and </body> tags.


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 GetCookiesA.wbsp

[FormFields]
<!--WB_BeginTemplate-->
<html>
<head>
<LINK href="$wbif[
"$wbgc[css]"=""
|
$wbif["$wbrv[style]"=""|style1.css|$wbrv[style]]
|
$wbif["$wbv[css]"=""|style1.css|$wbgeturl[changecss.wbsp?css=$wbv[css]]]
]" type=text/css rel=stylesheet>
<title>Cookie test</title>
</head>
<body>
Cookie value:($wbgc[css])<br>
Variablevalue:($wbrv[style])<br><br><a href="setcookieA.wbsp?css= style1.css&sp=$wbe[script_name]">Style1</a><br><br><ahref="setcookieA.wbsp?css=style2.css&sp=$wbe[script_name]">Style 2</a>
</body>
</html>

File SetCookieA.wbsp

[FormFields]
wb_command=R
wb_redirect=http://$wbe[server_name]$wbv[sp]?css=$wbv[css]
wb_addcookie=CSS=$wbv{CSS}

File ChangeCss.wbsp

<!--
[FormFields]
wb_filename=/default.inc
wb_command=wf
wb_keyname=Style
wb_keyvalue=$wbv{css}
wb_section=Userdata
-->
<!--WB_BeginTemplate-->$wbv[css]

File style1.css

body{
font-family:Verdana;
font-size:12px;
color:#333333;
background-color:#efefef;
}
a{
text-decoration:none;
color:#0065b7;
font-weight:bold;
}
a:hover{
color:#cc0000;
}

File style2.css

body{
font-family:Verdana;
font-size:12px;
color:#0000cc;
background-color:#ffffff;
}
a{
text-decoration:none;
color:#6500b7;
font-weight:bold;
}
a:hover{
color:#00cc00;
}

After running this example (file getcookiesa.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 links ("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 $WBGETURL function, and write new value to file /default.inc as user-defined variable "Style".