[nycphp-talk] embedding one web page in another
Brian Pang
bpang at bpang.com
Thu Jul 10 10:33:25 EDT 2003
I'm not sure if it's such a newbie question as it's not something I've
ever tried. Anyone else? How about you, Hans? You seem to have been
through a lot. :)
Wouldn't you be creating an insecure page by attempting to embed an SSL
page into a non-SSL page (assuming url_test04.php is in a non-secure
location)?
Are you certain that you compiled php with OpenSSL?
>
> Total newbie question. I'm trying to create a web page that will
include a
> complete secure page from page from a site where I am an affiliate. My
> goal, eventually, is to put this secure page in a table on one of my
pages.
> As the first step, I've learned to embed using Yahoo as an example. But
> when I change the URL from Yahoo to the secure page, I'm getting error
> messages.
>
> The example below (url_test04.php) substitutes XXXs for the affilaite ID
> code but in reality I'm using the right code and it opens normally in my
> browser.
>
> here's what works:
>
> QUOTE
>
> <html>
>
> <head>
>
> </head>
>
> <body>
>
> <?php
>
> $theurl='http://www.yahoo.com';
>
> if (!($fp = fopen($theurl, 'r'))) { echo 'Could not open URL'; exit; }
> $contents = fread($fp, 1000000);
>
> echo $contents;
>
> ?>
>
> </body>
>
> </html>
>
> END QUOTE
>
> But when I change to:
>
> $theurl='https://secure.onlineaccess.net/cart/manage.php?ID= XXXXXXXXXX' ;
>
> I get the following errors:
>
> Warning: Unable to access
> https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXXXX in
> /home/virtual/site1/fst/var/www/html/url_test04.php on line 13
>
> Warning:
> fopen("https://secure.onlineaccess.net/cart/manage.php?ID=XXXXXXXXXXX",
> "r") - No such file or directory in
> /home/virtual/site1/fst/var/www/html/url_test04.php on line 13
> Could not open URL
>
> Suggestions greatly appreciated regarding what I'm overlooking.
>
>
More information about the talk
mailing list