Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

readhttp

Format: readhttp( url, file )

Arguments: (text) url Any valid Internet URL using the HTTP protocol including references to HTML documents and CGI scripts

(text) file Optional name of a file where the data downloaded by readhttp should be stored

Returns: (text) The contents of the remote document specified by url

Description: Readhttp establishes a link with a remote host via the Internet and requests a document. Readhttp is similar to the read primitive in that it returns the entire contents of a document as a text string. Readhttp is different from read in that the document you read can reside on any computer attached to the Internet or your corporate Intranet. If you supply a filename, the contents of the URL document is written to the file rather than returned as a text string. This allows you to download binary files.

This primitive gives you programmatic access to the Internet. This allows you to retrieve up-to-date information from any Web site and automatically parse the data to extract valuable information. For example, you can easily build a library function that reads live stock prices from sites that provide stock quoting services.

If file does not contain full path information, the file is assumed to reside in the same directory as the .mdl or .dsb application file. If you include path information, remember that backslash characters must be typed twice in text literals (e.g., "c:\\temp.txt" instead of "c:\temp.txt").

Note: You must have an Internet connection for this primitive to operate. The connection can be through a LAN or dial-up connection so long as your network software uses the Windows Sockets protocol.

Examples: readhttp("http://www.vanguardsw.com/slop.htm")

  = reads the contents of the document slop.htm on the Vanguard Web server

readhttp("http://www.domain.com/cgi-win/dpwi.exe?
exec-script.dsb-Result")

  = reads the value of a node named Result in a script named script.dsb running in DecisionScript on another computer

See Also: read, mail, dialog

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend