Internet - Submit to Web

Submits data to a web site and automatically stores return values in variable names found in the response.

This action allows you to perform a POST or GET to a web script or program just as you would from an HTML form on a web site.

The web script or program can return information to AutoPlay in the following format:

<ReturnedData>
<Variable>
<Name>%VarName1%</Name>
<Value>Value1</Value>
</Variable>
<Variable>
<Name>%VarName2%</Name>
<Value>Value2</Value>
</Variable>
</ReturnedData>

If the Use variable option is disabled, AutoPlay will search the file returned until it finds the <ReturnedData> tag. AutoPlay will then parse each <Variable></Variable> section up to the next </ReturnedData> tag. (If an error occurs while parsing the file returned from the web script, error code 20 will be returned.)

Inside each <Variable> section, the text between the <Name> and </Name> tags will be the name of the variable, and the text between the <Value> and </Value> tags will be the value assigned to the variable.

In the above example, two variables would be set in the AutoPlay application: %VarName1% would have the string "Value1" assigned to it, and %VarName2% would have the string "Value2" assigned to it.

If the Use variable option is enabled, the entire file that is returned by the server will be stored in the variable specified in the Store body in variable field.

Action ID:
Action Category:
Action List Syntax:

144
Internet
Internet.SubmitToWeb (<<SUBMISSIONTYPE>>, <<URL>>, <<PARAMETERS>>)
or:

<<VARIABLE>>
= Internet.SubmitToWeb (<<SUBMISSIONTYPE>>, <<URL>>, <<PARAMETERS>>>)

Settings

Location/Connection

URL (host name, directory and file name)

The full URL of the page to submit to (e.g. "http://www.yoursite.com/yourdir/submit.php").

Connection timeout (secs)

The connection timeout in seconds for communication between the AutoPlay application and the HTTP site.

Port

The port to connect to on the HTTP server. The standard HTTP port 80 is used by default.

Submission Method

The method used to submit the data. Choose from GET or POST. If you are not sure of the difference, please consult a book or Web site about CGI programming.

Parameters

A list of name-value pairs that will be submitted to the script or program at the web site. These parameters allow you to pass information from the AutoPlay application to the web script or program. The name-value pairs will be URL encoded for you automatically at run time.

Authentication

This section allows you to specify a user name and password if the URL is protected by basic HTTP authentication.

Use HTTP basic authentication

Select this option to include basic HTTP authentication information in the HTTP request.

User name

The user name to use during authentication.

This field is only available when the Use HTTP basic authentication option is enabled.

Password

The password to use during authentication.

This field is only available when the Use HTTP basic authentication option is enabled.

Proxy Settings

This section allows you to specify proxy settings if your users will need to download files through a proxy server. You can fill in these fields with hard-coded values if your AutoPlay application will be distributed internally and you know the appropriate settings to use. If you don't know your users' proxy server details, you should use custom variables in these fields and then create a page that asks the user for the values at run time.

Proxy server address

The address of the proxy server. For example, "proxy.yourserver.com". Usually you will use a custom variable here such as %UserProxyAddress% and fill in the variable from user input.

Proxy server port

The port that should be used on the proxy server. The default is 80. Usually you will use a custom variable here such as %UserProxyPort% and fill in the variable from user input.

User name

The user name that should be used on your proxy server. Usually you will use a custom variable here such as %UserProxyUserName% and fill in the variable from user input.

Password

The password that should be used on your proxy server. Usually you will use a custom variable here such as %UserProxyPassword% and fill in the variable from user input.

Variable

Use variable

Select this option if you want the entire body of the file returned by the POST or GET to be stored in a variable.

Store body in variable:

The name of the variable that you want the body of the file returned by the POST or GET to be stored in.

This field is only available when the Use variable option is enabled.

Error Codes

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_NOCONNECT_SERVER_PROXY
<<URL>>

2

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_REQUEST_DENIED_SERVER
<<URL>>

3

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_INVALID_URL
<<URL>>

4

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_OPERATION_TERMINATED
<<URL>>

5

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_INVALID_TYPE
<<URL>>

6

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_UNABLE_OPENDATASOURCE
<<URL>>

7

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_TIMEOUT
<<URL>>

8

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_SOCKET_RECEIVE
<<URL>>

9

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_DATASOURCE_WRITE
<<URL>>

10

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_OPERATION_ABORTED
<<URL>>

11

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_CONNECTION_TIMEOUT
<<URL>>
<<TIMEOUT>>

12

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_SETPORT
<<URL>>

20

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_INTERNET_SUBMIT_PARSE_XML
<<URL>>

50

MSG_ERR_INTERNET_SUBMIT_TO_WEB

MSG_ERR_INTERNET_SUBMIT_TO_WEB
MSG_ERR_SERVER_ERRORCODE
<<URL>>

Examples

None