> I can't find any documentation on using the PING command to
> check for a valid URL. The alternative is to force my users
> to do it, when all I want is to check its validity before
> allowing them to enter it on my site.

Ping doesn't have anything to do with URLs. You use Ping to see if you can
connect to a specific IP address or DNS name. Ping uses ICMP as its
protocol, and doesn't tell you whether there's a web server running, or
anything else except that there is something at that address.

If you want to check a URL, you can use CFHTTP to test it, and in CF 4.5.x,
you can access the CFHTTP.StatusCode variable which will tell you whether
you could retrieve the requested resource. One caveat - if you do this with
a URL which points to a CF script, such as
"http://www.myserver.com/myfile.cfm", the CFHTTP.StatusCode will be 200,
which means that the server could respond successfully, even if there is no
file "myfile.cfm". CF returns a "fake" 404 HTML page, instead of returning a
404 status code.

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.

Reply via email to