Solved

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

Posted on 2009-07-16
2
307 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
change time in cron 4 78
Automate ColdFusion Internet Form with VBA from Access 10 51
Soundcloud.com 4 24
Ubuntu Apache Webserver - File Permissions 5 41
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
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…

773 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