Greetings Tumurbaatar,

That would work- and you shouldn't need any special mime types;
URL_fopen must be on and you simply use include() to get the remote
file read into the current one and executed.

But I highly suggest you find an alternative method- since this can
expose you to several security issues. The biggest of which is that
if someone can convince your application to include their file instead
of yours... you've supplied a remote code execution hack onto the
machine. Very dangerous.

James

>-----Original Message-----
>From: Tumurbaatar S. [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 09, 2004 5:31 AM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Remote include
>
>
>I need to include in my PHP code a script located at a remote
>web server. The script is also PHP and contains some functions and
>class definitions. Because the remote server also use PHP, I've
>changed my include file extension ("php") to something other (e.g. "inc").
>Because I'm afraid that the server will execute the script (which
>produces nothing) instead of sending its content. Am I doing right?
>Also, when the remote server sends this file back to my local server,
>what MIME type is returned in the response header? Anybody know it?
>Do I need to specify some type?
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to