CFHTTP and CFFTP

Team-Fly    

ColdFusion® MX: From Static to Dynamic in 10 Steps
By Barry Moore
Table of Contents
The Next Step: Advanced ColdFusion Functionality


<CFHTTP> and <CFFTP>

We have seen that we can get ColdFusion to interact with email services, such as SMTP and POP3. We also can get ColdFusion to use other Internet services, such as HTTP and FTP.

Using the <CFHTTP> tag, we can get the ColdFusion Server to hit another page on the Internet and retrieve its contents. For example, while processing a template, we might want to use <CFHTTP> to run out and grab some news or weather items off another web page and display them on our web page. The following code shows an example of the use of the <CFHTTP> tag:

 <CFHTTP URL="http://www.news-o-rama.com/feeds.htm"          METHOD="GET"          RESOLVEURL="false"></CFHTTP>  <CFOUTPUT>#CFHTTP.FileContent#</CFOUTPUT>

Using the <CFFTP> tag, we can get the ColdFusion Server to interface with an FTP server to perform operations, such as getting and putting files and creating and deleting files and directories.


    Team-Fly    
    Top
     



    ColdFusion MX. From Static to Dynamic in 10 Steps
    ColdFusion MX: From Static to Dynamic in 10 Steps
    ISBN: 0735712964
    EAN: 2147483647
    Year: 2002
    Pages: 140
    Authors: Barry Moore

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net