Avatar of nmarano
nmarano

asked on 

Checking website with cfhttp

Hello experts-

I have a list of websites I wanted to loop through and check to see if they are running.  I am checking the head in the cfhttp tag, but not getting the cfhttp.responseheader.status_code.

Any help would be appreciated

<cfset urlList ='http://www.keywordconnectss.com,http://google.com, http://www.marano-us.com,http://www.yahoo.com,http://www.espnnn.com'>
<cfloop list="#urlList#" index="i">
	<cfhttp method="head" url="#i#">

<cfoutput>

 #i#
 <cfif isDefined("cfhttp.responseheader.status_code")>
 	<cfset status =  #cfhttp.responseheader.status_code#>
    <cfelse>
    <cfset status = 404>
    #status#<br />
 </cfif>

Open in new window

ColdFusion Language

Avatar of undefined
Last Comment
nmarano
ASKER CERTIFIED SOLUTION
Avatar of _agx_
_agx_
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of nmarano
nmarano

ASKER

thanks will try that
ColdFusion Language
ColdFusion Language

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

11K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo