Solved

cfhttp to retreive remote image on coldfusion 5

Posted on 2008-06-24
2
465 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
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.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

739 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