Copy link to clipboard
Copied
what is the function of the CFHTTP tag and what is it used for often?
Copy link to clipboard
Copied
CFHTTP makes a request from the server to a webpage (any webpage) as
though the server were using a browser and returns information about it,
including the HTTP headers and the HTML content of the page itself.
Often used to consume SOAP webservices, and can also be used to "screen
scrape" site content, such as grabbing a page from your own site and
saving the content out to PDF.
Copy link to clipboard
Copied
It can be used to read a text file and return query object.
Copy link to clipboard
Copied
If you have not already, take a few minutes and read the documentation, you'll find everything you need there
here you go, http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_g-h_09.html
Copy link to clipboard
Copied
How would you use cfhttp to use a url and then try finding the last occurance of a word to get information needed? Im thinking of a loop but not sure how to implement it.
Copy link to clipboard
Copied
I am bit confused here!!!
Do you want to mention that - You will write a webservice which will find the last occurance of a word from DB/FILE and you will call that webservice using CFHTTP?
NOTE - URL is an attribute of CFHTTP tag.
Copy link to clipboard
Copied
I am writing a program that will be using some of googles API to find the distances between places locations that are stored in my DB. I want to find the distance but there are so many distance tags in the google XML and the last occurance of the distance tag contains the overall distance.
Copy link to clipboard
Copied
Sounds like an interesting project. What have you accomplished so far? What part are you stuck on?
Copy link to clipboard
Copied
Dan
I am not 100% sure but I guess we can use the xmlParse and xmlSearch function for this case. After getting all the occurance of the "distance" tag we can loop over that.
Can you please confirm this?
FYI - http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000672.htm#141075
Copy link to clipboard
Copied
Im stuck on the part where I want google maps to provide me with the distance and place it in my template rather than me having to visit the webpage and manually type the address. I've finished most of it and this is the last part im stuck on.