Solved

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

Posted on 2009-07-16
2
304 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
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SCCM vs Windows server 5 70
ColdFusion Rereplace 3 61
Problem to get function 52 82
Web Site Hosting 10 68
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
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 add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

763 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

8 Experts available now in Live!

Get 1:1 Help Now