RE: [PHP] How to include a page not on my host

From: Date: Fri, 30 Jun 2000 16:05:27 +0000
Subject: RE: [PHP] How to include a page not on my host
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4048@lists.php.net to get a copy of this message
Try readfile("http://whateverdomain/filename.html"); HTH Tom Henry At 11:48 AM 6/30/00 -0400, Peter Benoit wrote:
When I try include or require I get: Failed opening required 'http://www.xxxxxxxx.com/xxxx.html (include_path='') and when I try to use fopen I get: The file exists!Resource id #1 My code: <? $filename = "http://www.xxxxxxx.com/xxx.html"; $fp = fopen($filename,"r"); if ($fp){
        print"The file exists!";
}else{
        print"The file does not exist";
} echo $fp; fclose ($fp); ?> OR <? $tmp = "http://www.xxxxxxx.com/xxx.html"; require $tmp; ?> Confused, Peter -----Original Message----- From: Matt McClanahan [mailto:cardinal@dodds.net] Sent: Friday, June 30, 2000 11:50 AM To: Peter Benoit Cc: php-general@lists.php.net Subject: Re: [PHP] How to include a page not on my host On Fri, 30 Jun 2000, Peter Benoit wrote: I've seen this done before, but I can't find the page anywhere! I'd like to include a page that's not on my host into a page on my host. include and require both accept http:// and ftp:// URL's. However, if you're trying to include a PHP page on another host, be aware that when you include or require it, the file will be included after it as been parsed by the PHP engine on the remote server. Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
--------------------------------------------------------------------
Strategic Business Systems                  (978) 745-2332
                      http://BusinessWebs.com/
--------------------------------------------------------------------

« previous php.general (#4048) next »