Solved

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

Posted on 2009-07-16
2
310 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CFIf Syntax and Logic 27 74
coldfusion, javascript onclick url update 4 73
Company website 6 65
Error when uploading a document from an IPad 6 26
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
What You Need to Know when Searching for a Webhost Provider
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 Import and export files in 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 : Click on Too…

739 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