Script functions reference > Script functions in alphabetical order > U > URLOpen

URLOpen
Syntax
URLOpen(connectionID, strURL, "r");
connectionID
A name you specify which will be used in all the following URL functions to identify which URL to access.
strURL
"r"
Description
Opens a file at the specified URL for reading. The URL format must be one of the following:
http://[<username>:<password>@]<httpserver>[:<port>]/<path>
ftp://[<username>:<password>@]<ftpserver>[:<port>]/<path>
file://[[\\]<fileserver>]/<path>
Note:
You can also specify just a path, this will default to a file://<path> string.
Returns
A number indicating whether the file was successfully opened.
0
1
Example
//Open myfile.txt for reading
 
$readok = URLopen("my_conn_ID", "ftp://myserver/myfile.txt", "r");
 
OpenText StreamServe 5.6 Updated: 2013-03-01