Solved

How do you parse cfhttp.filecontent for a specific word?

Posted on 2009-07-16
2
306 Views
Last Modified: 2013-12-24
I am posting and get a web page back as a reponse and nee to parse for the word accepted.

<cfhttp post ....>

<cfoutput>#cfhttp.FileContent#</cfoutput>
     <cfset postresponse = "#cfhttp.FileContent#">
The response I get back is a full html page with lots of  data.
0
Comment
Question by:LeadCo
2 Comments
 
LVL 36

Accepted Solution

by:
SidFishes earned 500 total points
ID: 24873732
depends on what you are trying to do...

if you just want to know if accepted exists in the page it's easy

<cfif findnocase(" accepted ", cfhttp.filecontent)>
Found
<cfelse>
Not Found
</cfif>

note this looks for the whole word accepted with a space on each side of it...you may need to modify

if you need to extract specific instances ie: a confirmation number it's more complicated


i use cf_reextract  http://www.cftagstore.com/tags/cfreextract.cfm

it's $15 but i use it for a ton of stuff (payment validation, automated form data submission  etc)
0
 

Author Closing Comment

by:LeadCo
ID: 31604348
Thanks!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…
The purpose of this video is to demonstrate how to Test the speed of a WordPress Website. Site Speed is an important metric of a site’s health. Slow site speed can result in viewers leaving your site quickly and not seeing your content. This…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now