tags:

views:

32

answers:

1

My site is protected with SSL (https) I need to embed some images that are on an unsecured site (http).

How can I avoid the security errors recieved when trying to show content that was not delivered through https.

Example: http://0.chart.apis.google.com/chart?chtt=Answered+Calls&cht=bhs&chs=780x150&chbh=35,0,15&chg=8.33,0,5,5&chd=t:0,2&chco=4D89F9|C6D9FD&chf=bg,s,f8f8f8&chxt=x,y&chxl=1:|Answered|Unanswered&chds=0,2&chxr=0,0,2

Is there anyway I can pass this through a proxy to avoid errors???

A: 

Put this into a file called "chart.php" and use it as the image's src:

<?php
echo readfile("http://0.chart.apis.google.com/chart?chtt=Answered+Calls&amp;cht=bhs&amp;chs=780x150&amp;chbh=35,0,15&amp;chg=8.33,0,5,5&amp;chd=t:0,2&amp;chco=4D89F9|C6D9FD&amp;chf=bg,s,f8f8f8&amp;chxt=x,y&amp;chxl=1:|Answered|Unanswered&amp;chds=0,2&amp;chxr=0,0,2");
?>
In addition, you could adjust the file to accept the same query string as you send to the chart API; then, you could use the file for more than one chart.
I do this but it doesn't display correctly: <img src="<?phpecho readfile("http://0.chart.apis.google.com/chart?chtt=Answered+Calls?>" />
Right, because you're dumping the bytes of the image into the src attribute. You need to do this: `src="chart.php"`, where chart.php is the name of the file whose contents are what I gave you above.
cool that works, I will have to pass the variables to it in the URL i guess
I've edited my answer to reflect our conversation.