Solved

cfhttp to retreive remote image on coldfusion 5

Posted on 2008-06-24
2
460 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now