Solved

cfhttp to retreive remote image on coldfusion 5

Posted on 2008-06-24
2
462 Views
Last Modified: 2013-12-24
Hi,

I've tried many things, the code attached is where I am now with it. Basically, I am trying retrieve images from a remote server (inside the firewall) for display back. Only the web server outside the firewall is allowed in to get the images.

The only problem is because of support reasons and this running on an archaic CMS I am stuck with only CF5 at my disposal. I've seen examples elsewhere of people doing this but with at least CF 6 or 7.

I have tried it with getasbinary set to "yes" and that doesn't help. Also, Firefox shows the URL of the cfm page as the result and IE shows the familiar image icon with a red "x" in it.

Thanks in advance for any assistance.
<cfsetting enablecfoutputonly="yes" showdebugoutput="no">
<cfcontent type="image/png; charset=ISO-8859-1">
<cfheader name="Content-Type" value="image/png">
<cfhttp GetAsBinary="yes" url="http://images.domain.com:8080/i/image.png" method="GET"></cfhttp>
<cfoutput>#trim(toString(cfhttp.filecontent))#</cfoutput>

Open in new window

0
Comment
Question by:woaz
2 Comments
 
LVL 25

Expert Comment

by:James Rodgers
ID: 21878949
you are getting an error because the page/image is not being served by the webserver

just put http://images.domain.com:8080/i/image.png into a web browser you get an error, so its not the  code but the url
0
 

Accepted Solution

by:
woaz earned 0 total points
ID: 22010091
Thanks for the reply Jester. Putting the URL in directly doesn't give me the error as long as i'm not on the public network. That is why I was trying to proxy the image by having the webserver in the DMZ make the request to retreive the image. It has

Anyways, I found another solution. I am building the images on the fly and shipping them into a cache folder in the DMZ. A side benefit is improved performance.

Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question