Check URL
Is there any way to check whether a Home Page using .cfm loads? Maybe checking if the standard CF error page displays? I know this may be vague, but it's a direction to seeing if the cf server is down or is there another path I could go? Any advice would be helpful. Thanks as always...y'all have given me good advice over the years. Robert O. HWW ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259704 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Check URL
Check the HTTP header? 200 OK. -Original Message- From: Orlini, Robert [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 4:15 PM To: CF-Talk Subject: Check URL Is there any way to check whether a Home Page using .cfm loads? Maybe checking if the standard CF error page displays? I know this may be vague, but it's a direction to seeing if the cf server is down or is there another path I could go? Any advice would be helpful. Thanks as always...y'all have given me good advice over the years. Robert O. HWW ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259706 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: PING to check URL
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=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
PING to check URL
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. Any thoughts? TIA, -- John Allred / Jackson, Mississippi Mississippi Counties http://www.mscounties.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: PING to check URL
But wouldn't PING only recognize whether or not the URL was valid (as you said)? But that wouldn't mean that there actually is a web site that is up and running for that URL. Maybe a better thing would be to just let users enter their URL. Have the URL flagged in the database and have a spider check any flagged URLs to see if a web site exists there. Just my two-bits worth. -Allen - Original Message - From: "John Allred" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, May 30, 2000 3:33 PM Subject: PING to check URL 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. Any thoughts? TIA, -- John Allred / Jackson, Mississippi Mississippi Counties http://www.mscounties.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: PING to check URL
There is a custom tag which allows you to issue any command line calls. I belive it is called "command console" or something to that effect. Good Luck. bd At 03:33 PM 30/05/00 -0500, you wrote: 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. Any thoughts? TIA, -- John Allred / Jackson, Mississippi Mississippi Counties http://www.mscounties.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: PING to check URL
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=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: PING to check URL
In the gallery there is a custom tag called cfx_http which will return header information. From that you can test if it returns a valid header or not and then accept the url the users give you etc. Sincerely, Rob Sherman Developer / Allaire Certified Instructor CFDude, Inc. http://www.cfdude.com -- Email:[EMAIL PROTECTED] ICQ:_3266081 AIM:__RobSSherm Yahoo!:RobSherman_CFDev Office:__(310) 543-1622 Office Fax:__(310) 543-0512 VMail/Fax:__(310) 754-6016 ext. 5630 -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: PING to check URL
Thanks, Dave. Maybe I'm narrowing the choices by my question. I'm not hung up on PING. I would merely like to be able to check for a URL behind the scenes in my script, without forcing my visitor to do it for me (enter it, test it, and either click the back button or close the new window, depending on how I set it up). If the address, entered in a browser, would return a 404 I'd like to be able to send back a prompt, so the user can take appropriate action. Thanks, John Dave Watts wrote: 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. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: PING to check URL
"ping /?" will give you help associated with the command. ping will only return on the host/ip address and to my knowledge is not meant to check validity of a url. Shane -Original Message- From: John Allred [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 30, 2000 4:34 PM To: CF-Talk Subject: PING to check URL 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. Any thoughts? TIA, -- John Allred / Jackson, Mississippi Mississippi Counties http://www.mscounties.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: PING to check URL
Maybe I'm narrowing the choices by my question. I'm not hung up on PING. I would merely like to be able to check for a URL behind the scenes in my script, without forcing my visitor to do it for me (enter it, test it, and either click the back button or close the new window, depending on how I set it up). If the address, entered in a browser, would return a 404 I'd like to be able to send back a prompt, so the user can take appropriate action. This requires making an HTTP request for the URL and seeing the results you get back, or the status code if you're using CF 4.5.x. From CF, you can use CFHTTP to do this. 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=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: PING to check URL
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 is only for ip addresses (ie, 127.0.0.1), not URLs. Use CFHTTP or something similiar to detect if an URL exists. --min -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: PING to check URL
You can't 'ping' a URL. You can ping an IP address or properly qualified domain name and this simply tells you if the machine/Internet appliance has a network interface up and listening at that address. 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). 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. HTH! __ Chris Chambers AIM: CTC HOME ICQ: 40311211 VOX: 757-896-6393 FAX: 757-896-0774 Our tests indicate that our software is functioning exactly as coded __ -Original Message- From: John Allred [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 30, 2000 4:34 PM To: CF-Talk Subject: PING to check URL 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. Any thoughts? TIA, -- John Allred / Jackson, Mississippi Mississippi Counties http://www.mscounties.com/ -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.eGroups.com/list/cf-talk To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.