[nycphp-talk] embedding one web page in another
joe
joehark at earthlink.net
Thu Jul 10 06:20:57 EDT 2003
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030710/e559f4b0/attachment.html>
More information about the talk
mailing list