RE: [PHP] include() question
| From: | Jay Blanchard | Date: | Mon, 08 May 2006 18:05:54 +0000 |
| Subject: | RE: [PHP] include() question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-235742@lists.php.net to get a copy of this message | ||
[snip]
I am including a page from another server: (include("http://...."));
Works fine, but if for some reason that server is not responding, the page that is calling it also
never returns, so the user ends up with a time out.
Is there something I can set that will not force the calling server to wait indefinetely for the
remote server to respond, and just continue on?
[/snip]
This is;
a. A Bad Thing [tm]
2. RTFM http://www.php.net/include "Remote file may be
processed at the remote server (depending on the file extension and the fact if the remote server
runs PHP or not) but it still has to produce a valid PHP script because it will be processed at the
local server. If the file from the remote server should be processed there and outputted only,
readfile() is much better function to use. Otherwise, special care should be taken to secure the
remote script to produce a valid and desired code."