<@URL>Syntax<@URL LOCATION=location [BASE=base] [USERAGENT=useragent] [FROM=from] [ENCODING=encoding]> DescriptionRetrieves the specified URL and returns its data, stripped of the HTTP header. <@URL> supports only HTTP URLs. The HTTP-type URL must be of the following form: http://hostname:port/path?search-arguments where port defaults to 80 if not specified, and path and search-arguments are defaulted to an empty list. The BASE attribute adds the specified value as an HTML <BASE> tag (that is, <BASE HREF=base>) within the HTML <HEAD> element of the retrieved HTML. This is necessary to load any inline data (for example, images) that are specified in relative URL format on the page retrieved. Tango prepends the specified value of the BASE attribute to the relative path. For more information, see "userAgent". The USERAGENT attribute is placed in the User-Agent line of the request. If USERAGENT is not specified, or is empty, the value of the userAgent configuration variable is used. The User-Agent value in HTTP requests gives the destination server information about the program (such as, name, version, and platform) that is requesting the URL. For example, the User-Agent value passed by Netscape Navigator 4.04 for Windows NT is: Servers often use the user agent information to determine the format of the results returned. (Tango application files can get the user agent information from a request using <@CGIPARAM NAME="USER_AGENT">.) For example, a server may return a special version of a page, including Web browser-specific HTML for additional features, when the Web browser is Netscape Navigator or Microsoft Internet Explorer. Use the USERAGENT attribute when you want Tango Server to emulate a specific Web browser so the server returns the data in the format you want. The FROM attribute sets the value for the From line of the HTTP header specified for in the <@URL> meta tag. For more information, see the section "Timed URL Processing With Tango Server" in the chapter "Using Tango Sever" in the User's Guide. You should use the FROM attribute to specify the e-mail address of the person to contact if the URL request is causing problems at the destination server. Supplying an e-mail address is especially important when the <@URL> meta tag is included in an application file that is executed automatically using Tango's timed URL processing functionality. If something goes wrong, the destination server administrator knows who to contact. (Tango application files can get the FROM information from a request using <@CGIPARAM NAME="FROM_USER">.) If you do not specify a value, the default value is given by the configuration variable, mailDefaultFrom. The <@URL> meta tag returns an error message if a time out or error condition occurs.
Examples<@URL LOCATION="http://www.redhat.com/"> <@URL LOCATION="http://www.redhat.com/"
BASE="http://www.redhat.com/"
See Also |
Copyright © 1998, Pervasive Software Inc. All rights reserved.