User Guide
340 Chapter 18 Interacting with Remote Servers
To return results of a CGI program:
The following code runs the (theoretical) CGI program search.exe on the (equally
theoretical) somesiteorother.com site and displays the results, including both the
Mime type and Length of the response. The search.exe program must expect a
“search” parameter.
<cfhttp method="Post"
url="http://www.somesiteorother.com/search.exe"
resolveurl="Yes">
<cfhttpparam type="Formfield"
name="search"
value="Macromedia ColdFusion">
</cfhttp>
<cfoutput>
Response Mime Type: #cfhttp.MimeType#<br>
Response Length: #len(cfhttp.filecontent)# <br>
Response Content: <br>
#htmlcodeformat(cfhttp.filecontent)#<br>
</cfoutput>