taken from http://www.fsc.follett.com/company/cf/cfx_http/ Parameters URL Required. Fully qualified URL to retrieve. It must be an HTTP URL. UserAgent Required. Specifies the User-Agent: HTTP header to be passed to the server. This header is the name that shows up in the target site's log. This helps the site know who is visiting their site. For our internal link-checking spider that we call the WebChimp, the UserAgent parm is "WebChimp/1.0". Verb Optional. Specifies the HTTP verb to use (either "GET" or "HEAD"). GET is assumed if this is omitted. Timeout Optional. Specifies the number of seconds to run before timing out on non-responsive sites. Note: This parm does not work. See "Known Issues" below. Accept Optional. Specifies the MIME type to accept, such as "text/*". Example of calling CFX_HTTP #CFX_HTTP.FileContent# Oops, you got a #CFX_HTTP.ResponseCode# error! Using CFX_HTTP's returns CFX_HTTP creates a one-row query in the caller's namespace called CFX_HTTP. It's a true query, so you can use something like CFX_DumpQuery to view all your results. However, you can still refer to the first (only) row in the query with .Field syntax. Please note that if CFX_HTTP.ResponseCode is -1, because of a non-HTTP error, only the CFX_HTTP.FileContent field will have a valid value in it. All other fields will be undefined, and accessing them through CF tags will make CF throw an exception. CFX_DumpQuery handles these undefined fields, so may be a better choice for viewing your responses. CFX_HTTP.ResponseCode The 3-digit response code (i.e. 200, 404, 500, etc). If you want a textual description, you'll have to bust up CFX_HTTP.Headers. If the response code is -1, then there was some non-HTTP error. For instance, if the server can't resolve the DNS name for the URL, the response will be a -1. If so, the textual description of the error will be in CFX_HTTP.FileContent. CFX_HTTP.FileContent This is analogous to CFHTTP.FileContent if the call succeeds, or the error message in the case of something failing. This field will be blank for a HEAD call. CFX_HTTP.URL Returns the URL that was fetched. CFX_HTTP.Title This is the contents of the tag in the returned page. This is to save you the hassle of parsing the whole page when you only want the title, as in a web spider. This field will be blank for a HEAD call. CFX_HTTP.Headers This is a CRLF-delimited list of all the HTTP headers passed back to your server. CFX_HTTP.LastModified The content of the Last-Modified: header CFX_HTTP.Date The content of the Date: header Known issues The TIMEOUT= parm does NOT work. For some reason, CFX_HTTP's overriding of Wininet's default of 45 seconds for timeouts is ignored. All timeouts will happen after 45 seconds. If anyone's an expert with WinInet and can help, please contact me at cf@fsc.follett.com. Differences from CFHTTP The two big differences are: No RESOLVEURL parm This functionality is in the sister tag CFX_ParseHTML. CFHTTP's RESOLVEURL is slightly buggy as it is. (It prepends servers to javascript: and mailto: URLs.) No POST functionality CFX_HTTP only supports the GET and HEAD operations Revision History v1.31 Added progress diagnostics if the DEBUG flag is set. v1.30 Added seconds and time zone to the time fields. Added the optional Accept parm. Fixed a bug where the User-Agent passed was always CFX_HTTP. v1.28 Used shared MFC DLLs, which should greatly reduce memory usage. v1.27 Formatted the return code of Last-Modified: and Date: into something reasonably nice. v1.26 Add support for Content-Length: and Content-Type: headers v1.25 Add support for Last-Modified: and Date: headers v1.1 Fixed problem with caching results. v1.04 Added URL and Title columns. v1.03 Fixed bug in handling non-existent domains. v1.02 Added support for VERB and USERAGENT parms. v1.00 Initial version Terms Of Use CFX_HTTP is Copyright 1999 by Follett Software Company. You may use CFX_HTTP free of charge. We do not guarantee that it will work for your specific needs, or even that it will work. If it breaks, you get to keep both pieces. We're glad to hear your comments and suggestions, but cannot guarantee that any improvements will be made. Our business is creating quality software for libraries and schools, not ColdFusion component development. No tags from Follett's ColdFusion pages may be redistributed. Please feel free to link to our pages, but please do not post the tags on your own pages. Contacting Us We welcome and encourage all comments and suggestions about CFX_HTTP, good and bad. Please contact us at cfusion@fsc.follett.com The Follett Software Company ColdFusion pages are at http://www.fsc.follett.com/company/cf/cfx_http/ Download CFX_HTTP.zip