> Verifying that a URL is live (e.g. not returning a 404) is a bit
> more tricky.
>
> You could use CFHTTP and parse CFHTTP.FileContent for 404 (or
> other status codes) to verify that the link is live, however, I
> would caution you in doing so if the site you are building will
> receive heavy traffic (500K hits a day or more depending on the
> average latency between your server and the URLs to be checked).
The HTTP status code won't be contained within CFHTTP.FileContent, which
just contains the HTTP response body. The status code is found within the
HTTP response header. If you're using CF 4.5, you can read the header from a
CFHTTP request by referencing either CFHTTP.Header, which is a raw string
containing all response headers, or CFHTTP.ResponseHeader, which is a
structure containing each individual header as a string or, if there are
multiple instances of that header, as an array.
> Also, you might want to look into CFX_HTTP (someone please
> correct me if I am wrong), as it is more robust than the built-in
> Allaire tag.
I think that CFHTTP in 4.5 works well enough for most purposes. CFX_HTTP
offers header info, so if you're using CF 4.0.1, you might want to use it.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.