Investment Studio > Views > Downloads > Downloader > ActiveX interface > DLInput > addUrl

long DLInput.addUrl(BSTR newUrl, VARIANT_BOOL crawl)

Adds an entry to the download item's list of URLs. Use this method in your downloader script's URL generation method.

newUrl is a string containing the full URL in standard format: a protocol ("file:///" for a local file, "http://" or "ftp://" for data on a remote server) followed by a server identifier (for HTTP and FTP) and a path.

HTTP and FTP URLs can identify a server using its name or its IP number. The server identifier can also be followed by a port number (separated by a colon, ":") to force connection through a non-standard server port. For instance, newUrl = "http://www.a-server.net:8080/a-directory/a-file.htm" means "connect to the server called 'www.a-server.net' using server port 8080 instead of the standard HTTP server port and grab the file 'a-file.htm' in the directory '/a-directory/'".

Symbolic directory names (e.g. "<DATA>") in local ("file:///") paths are automatically expanded to actual directory names.

crawl should normally be set to FALSE. Setting crawl = TRUE causes the downloader to call the URL method again when the data at newUrl has been retrieved. This will cause an endless loop if you do not stop adding URLs at a finite link level in your URL generation method!

Do not set crawl = TRUE without having first read and understood the section on URL crawling. Crawling is a recursive and therefore potentially endless process. It is the URL method's responsibility to stop adding new URLs at a finite (and reasonable) link level. Use DLInput.currentLevel to determine where you are in the lnk tree.

When URLs are crawled, child URLs are inserted into the download item's URL list immediately after their parent URL.

See also DLInput.currentLevel, DLInput.read, DLInput.url, DLInput.urlLevel.