At 2:09 PM -0600 1/5/01, Jennifer wrote:
>I'm looking for ideas because I'm not sure how to go about this. I'm
>setting up some pages that are going to have links to external sites. I
>know how bad it looks to have broken links so I'd like to check the links
>on a schedule and remove any links that are broken. I'll still get some
>broken inks but it's better than using up my server resources checking
>links every time a page loads. At any rate, I'm not sure quite how to check
>the links in the way I'd like to. I'm considered trying
><CFHTTP method="get" ... throwonerror="yes">
>but I'm not sure that it will do what I want it to do. In some cases I want
>to make sure that the server is responding (because I don't have a specific
>file to point to)

How can this be, a link points to a file even if the file is not 
specifies in the link it is assumed by the server (index.htm, etc.)?



>  and in some cases I want to make sure there isn't a 404
>error (because I do have a specific file to point to). This would probably
>work for a 404 error but frankly, I didn't understand the section of the
>CFML Language Reference that talked about whether a filename is required
>for CFHTTP.

A valid URL... need not contain a filename


>To be honest, I don't even want to get the file-- I just want
>to make sure it is available. I don't have access to these servers so I
>can't put a dummy file on the server to get to make sure the server is
>responding.
>
>Is there a better way to do this that I'm missing? Ideas?


You can specify a time out then:

    check the length of CFHTTP.FileComtent = 0

    Do  a Finf or ReFind for a 404

other than that, the link is probably good!

HTH

Dick



>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to