MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 810

Developing coldfusion mx applications
Table of Contents

Advertisement

Reviewing the code
The following table describes the code and its function:
Code
<cfhttp
method = "Get"
url="http://www.macromedia.com/
software"
path="c:\temp"
file="macr_software.htm">
To get a binary file and save it:
Create a ColdFusion page with the following content:
1
<cfhttp
method="Get"
url="http://www.macromedia.com/macromedia/accessibility/images/
spotlight.jpg"
path="c:\temp"
file="My_SavedBinary.jpg">
<cfoutput>
#cfhttp.MimeType#
</cfoutput>
(Optional) Replace the value of the
2
to download.
(Optional) Change the path from C:\temp to a path on your hard drive.
3
Save the file as save_binary.cfm in the myapps directory under your web_root and open it in the
4
web browser to view the MIME type.
(Optional) Verify that the binary file now exists at the location you specified in the
5
attribute.
Reviewing the code
The following table describes the code and its function:
Code
<cfhttp
method="Get"
url="http://www.macromedia.com/macromedia/
accessibility/images/spotlight.jpg"
path="c:\temp"
file="My_SavedBinary.jpg">
<cfoutput>
#cfhttp.MimeType#
</cfoutput>
810
Chapter 36: Interacting with Remote Servers
Description
Get the page specified in the URL and save it in the file
specified by the
path
When you use the
ColdFusion ignores any
result, frames and other included files cannot appear
when you view the saved page.
attribute with the URL of a binary file that you want
url
Description
Get a binary file and save it in the path
and
Display the MIME type of the file.
and
attributes.
file
and
attributes,
path
file
attribute. As a
resolveurl
specified.
file
path

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents