Command Reference

Submit to Web

Submits data to a web site and automatically stores values in variables 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 Setup Factory in the following format:

<SUF60>A comma-separated list of custom tag names (used to identify variables and their values).</SUF60>
<TAG1>Data</TAG1>
<TAG2>Data</TAG2>

Setup Factory will search the file returned by the web server for the <SUF60> tag, find out what other tag names to look for in the file, and then search for those tag names and translate them into variables. The tag names become variables and the tagged data become the values of the variables.

For example:

<SUF60>%UserName%,%AuthorizedToUpdate%</SUF60>
<%UserName%>William Gates</%UserName%>
<%AuthorizedToInstall%>FALSE</%AuthorizedToInstall%>

Would result in the following:

The value "William Gates" would be assigned to a new (or existing) variable named %UserName%
The value "FALSE" would be assigned to a new (or existing) variable named %AuthorizedToInstall%

Action ID: 19
Action Category: Internet

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 setup executable 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 setup executable to the web script or program. The name-value pairs will be URL encoded for you automatically at runtime.

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

If checked, basic HTTP authentication information will be included in the HTTP request.

User name

The user name to use during authentication.

Password

The password to use during authentication.

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 setup will be distributed internally and you know the appropriate settings to use. If you're not sure whether your users will be using a proxy server, you should use custom variables in these fields and then create a screen 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 the variable in from a screen.

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 the variable in from a screen.

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 the variable in from a screen.

Password

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

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Failed to submit to Web.

Unable to connect to server or proxy server.
<<URL>>

2

Failed to submit to Web.

Request denied by server.
<<URL>>

3

Failed to submit to Web.

Invalid URL supplied.
<<URL>>

4

Failed to submit to Web.

Operation terminated before completion.
<<URL>>

5

Failed to submit to Web.

An invalid type has been specified.
<<URL>>

6

Failed to submit to Web.

Unable to open specified data source.
<<URL>>

7

Failed to submit to Web.

Timeout occurred.
<<URL>>

8

Failed to submit to Web.

Socket receive error occurred.
<<URL>>

9

Failed to submit to Web.

Data source write error.
<<URL>>

10

Failed to submit to Web.

Operation aborted.
<<URL>>

11

Invalid parameter value(s).

Connection timeout.
<<URL>>
<<Timeout>>

12

Failed to submit to Web.

Failed to set port.
<<URL>>

50

Failed to submit to Web.

Error code returned by server.
<<URL>>

Example

In this example, we will pass the user's name and the current date to a PHP script on our website. Our PHP script will take those two values and use them to calculate a password. Once the PHP script has calculated the password, it will pass the information back to our update as the variable %UserPass%.

Note: %Date% is a built-in variable. There are other date variables available as well, including %EuropeanDate%, %ISODate% and %JulianDate%.

URL (host name, directory and file name): http://www.indigorose.com/mark/soft/passform.php
Connection timeout (secs): 40
Port: 80
Submission Method: GET
Use HTTP basic authentication: Unchecked
Parameters:
"UserName" = "%UserName%"
"Date" = "%Date%"

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab