Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFHTTP Function and Use?

New Here ,
Mar 31, 2011 Mar 31, 2011

what is the function of the CFHTTP tag and what is it used for often?

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 31, 2011 Mar 31, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 31, 2011 Mar 31, 2011

It can be used to read a text file and return query object.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2011 Apr 01, 2011

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


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2011 Apr 01, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2011 Apr 01, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2011 Apr 01, 2011

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 01, 2011 Apr 01, 2011

Sounds like an interesting project.  What have you accomplished so far?  What part are you stuck on?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 01, 2011 Apr 01, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2011 Apr 01, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources