there is a way to prevent the remote server from parsing the file before sending it:
use an extension that is not associated to php on that server (ie something like 
.incphp or whatever extension that is not parsed on that server) and add that 
extension in the "receiving" server's config
for instance if y're using apache, y'd add:

Action application/x-httpd-php4 "/php4/php.exe"
        AddType application/x-httpd-php4 .php .incphp

this way the sending server would send the file as plain text and your server would 
include it and parse it
i never tried this but it should work

the downside with this is that your includes could be easaly downloaded and read by 
anyone on the host server, but you could restrict access to those files to some 
hosts.....

regards

hassan el forkani


09/05/01 13:37:55, Ben Cairns <[EMAIL PROTECTED]> wrote:

>When PHP does a require or an include on a remote file via http, it sends a 
>GET request to the http server that the file is on,
>
>Therefore, if this server has PHP installed on it, then the web server will 
>parse the file before it spits it out. Thus, all of the PHP tags are stripped 
>fom the file for output.
>
>Therefore, you cannot remotely include (via http) a php file. If you could, 
>this would be a massive security loophole.
>
>
>-- Ben Cairns - Head Of Technical Operations
>intasept.COM
>Tel: 01332 365333
>Fax: 01332 346010
>E-Mail: [EMAIL PROTECTED]
>Web: http://www.intasept.com
>
>"MAKING sense of
>the INFORMATION
>TECHNOLOGY age
>@ WORK......"
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to