posturl(
VARIABLE
,
URL
,
ITEM
,
VALUE
)

The posturl( function loads a resource from the internet, with form data.


Parameters

This function has four parameters:

variable – is the name of the variable you wish to place the downloaded resource (usually text).

url – is the address of the resource to be loaded, for example "http://www.apple.com".

item – is the name of a form item expected by the server. Each name parameter must be paired with a value parameter (see below), you can have as many item/value pairs as the server calls for.

value – is the value of a form item.


Description

This function loads a resource from the internet using HTTP POST (to make a HTTP GET request use the loadurl( function). In addition to the url itself, you can use a dictionary to supply one or more post arguments. These allow you to post data that would normally be supplied by an HTML form. In this example, two values are posted, Name and Email.

displaydata posturl("http://www.somesite.com/register",
    initializedictionary("Name","John Smith","Email","jsmith@xyzmail.com"))

This function returns whatever data the server responds with, usually HTML text.

Note: The posturl( function is synchronous. This means that Panorama stops in its tracks until the communication is complete, so you should avoid this function if possible and use urltask( instead.


See Also


History

VersionStatusNotes
10.0NewNew in this version (though of course previous versions had a statement to do this, which is still available).