<submit [options] URL=$theURL [var=value ...]>
submit function submits an HTML form, i.e. as a Web
browser would. The given URL is fetched, using the HTTP
method (or its equivalent for non-HTTP URLs). The submission will
include the (optional) list of variables given, URL encoded.
Multi-valued variables will have each of their values sent as a
separate value, e.g. for a multi-value
SELECT box on a form.
Options that may be set before the variables are:
URL=$theURLThe URL to fetch; required. Note that if it contains a query string it will be replaced by the given variables list if the
METHOD=$methodThe HTTP method to use (or its equivalent if a non-HTTP URL is given). The default is
$methodmay be one of
RENAME. Note that not all web servers support all methods; most implement only
POSTreliably. Consult an HTTP reference, such as RFC 2068, for details on these methods. Note that for FTP URLs, only
DELETEare supported. For Gopher URLs, the method is irrelevant. Other protocols may not support all methods, or may map some methods to an equivalent action.
DATA=$dataThe raw data to send. This is generally required for FTP URLs with the
PUTmethod, and in conjunction with
CONTENT-TYPEis useful in specifying an alternate content for HTTP submissions. Note that content is only sent for the methods
FROMFILEand the variable list, if any. Added in version 2.1.900648000 19980717.
FROMFILE=$fileThe name of the file to send as content. This is useful when sending a large file via FTP, which may not fit in memory if read separately and sent as a
DATAbuffer. If the
-" (dash), the standard input is sent instead; this is only valid for non-CGI (command-line) scripts. The
FROMFILEoption was added in version 2.6.938460000 19990927.
TOFILE=$fileThe name of the file to save the content to. This is useful when receiving a large file via FTP which may not fit in memory as
$ret. If the
-" (dash), the content is written to the standard output of the script. Note that setting
TOFILEwill cause the usual output document returned via
$retto be empty, and any output-derived fields obtainable via
urlinfosuch as links, formatted document, etc. will be unavailable. Added in version 2.6.938460000 19990927.
CONTENT-TYPE=$typeSpecify the content-type of the data given with
DATA. The default is none, or "
application/x-www-form-urlencoded" if variables are given directly. Added in version 2.1.900648000 19980717.
submit returns the raw document fetched.
The following HTML form found on a web site:
<FORM METHOD=post ACTION=http://www.xyz.com/cgi-bin/prog>
Name: <INPUT NAME=Name>
Colors: <INPUT TYPE=checkbox NAME=Color VALUE=red>red
<INPUT TYPE=checkbox NAME=Color VALUE=blue>blue
<INPUT TYPE=checkbox NAME=Color VALUE=green>green
could be submitted to in Vortex as follows:
<$mycolors = "red" "green">
<submit METHOD=POST URL=http://www.xyz.com/cgi-bin/prog
submit function was added Sep. 17 1996. Support for FTP
was added in June 1998, and Gopher in version 2.6.938200000 19990924.
In versions prior to 3.0.949000000 20000127, or if
<urlcp dnsmode sys> is set, domain name resolution may exceed
<urlcp timeout> setting (due to C lib constraints).
Any query string already present in the given URL will necessarily
be stripped if the
GET and one or more
variables are given.
TOFILE is given, the normal output returned via
is empty, and content-derived fields such as links, formatted text, etc.
urlinfo are unavailable.
This is because the (potentially large) data being received is sent
directly to a file without processing.