LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PHP cURL how to get page image from remote server without errrors (https://www.linuxquestions.org/questions/programming-9/php-curl-how-to-get-page-image-from-remote-server-without-errrors-801340/)

devwink 04-11-2010 06:54 AM

PHP cURL how to get page image from remote server without errrors
 
Hi All

I can get a dynamic image to display in my webpage

<td><img src="<? echo image.php" ;?>"

where image.php is some ones example that outputs some characters to screen.


All works fine

But the site is ssl,and It wont load the "foreign" object for security reasons.

I was wondering I cURL could trick the browser into thinking that the image source is still on the same server.

Both sites are ssl!

like
<?php
$remote = 'https://example.com/image.php';
curl_setopt($ch, CURL_SSL_VERIFYPEER,0); // for testing
curl_setopt($ch, CURL_SSL_VERIFYHOST,0); // for testing
curl_exec($ch);
curl_close($ch);

doesn't return anything.

Any ideas would be appreeciated

devwink 04-12-2010 07:53 AM

Thanks Guys,

It turns out that i mad the server SSL and forgot to port forward 443 to the pubilc ip address behind the dsl modem


All times are GMT -5. The time now is 04:29 AM.