![MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Скачать руководство пользователя страница 258](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-developing-web/coldfusion-4-5-developing-web_develop-manual_3286369258.webp)
232
Developing Web Applications with ColdFusion
Using CFHTTP to Interact with the Web
The CFHTTP tag is one of the more powerful tags in the CFML tag set. You can use one
of two methods to interact with a remote server using the CFHTTP tag: Get or Post. The
Get method is a one-way transaction in which CFHTTP retrieves an object. By
comparison, the Post method is a two-way transaction in which CFHTTP passes
variables to a ColdFusion page or CGI program which then returns data, usually
processing what was received.
Allaire Alive
A video titled, "Creating Web Agents" is available at
http://alive.allaire.com
. It gives an
overview of HTTP and covers the use of CFHTTP for creating automated processes
such as:
•
Search agents
•
Transaction agents
•
Messaging agents
The video is part of Allaire Alive, an educational service that offers Web videos on
topics specific to ColdFusion development and application deployment as well as
broader industry issues. The titles are available free for online viewing or download.
Using the CFHTTP Get Method
You use Get to retrieve text and binary files from a specified server. The examples
below illustrate a few common GET operations.
To retrieve a file and store it in a variable:
1.
Open a new file in Studio.
2.
Modify the file so that it appears as follows:
<CFHTTP METHOD="Get"
URL="http://www.allaire.com/index.cfm"
RESOLVEURL="Yes">
<CFOUTPUT>
#CFHTTP.FileContent# <BR>
</CFOUTPUT>
3.
Save the file as
getwebpage.cfm
in
myapps
under your Web root directory and view
it in your browser.
Содержание COLDFUSION 4.5-DEVELOPING WEB
Страница 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Страница 14: ...xiv Developing Web Applications with ColdFusion...
Страница 26: ...xxvi Developing Web Applications with ColdFusion...
Страница 34: ...8 Developing Web Applications with ColdFusion...
Страница 70: ...44 Developing Web Applications with ColdFusion...
Страница 84: ...58 Developing Web Applications with ColdFusion...
Страница 114: ...88 Developing Web Applications with ColdFusion...
Страница 148: ...122 Developing Web Applications with ColdFusion...
Страница 174: ...148 Developing Web Applications with ColdFusion...
Страница 208: ...182 Developing Web Applications with ColdFusion...
Страница 244: ...218 Developing Web Applications with ColdFusion...
Страница 274: ...248 Developing Web Applications with ColdFusion...
Страница 288: ...262 Developing Web Applications with ColdFusion...
Страница 300: ...274 Developing Web Applications with ColdFusion...
Страница 350: ...324 Developing Web Applications with ColdFusion...
Страница 362: ...336 Developing Web Applications with ColdFusion...