I don't think this will work, because if it is configured correctly, that file will be parsed by PHP before(as) apache gets it, meaning the only part apache gives you is the result of all the code executing in that page. Exactly like a web browser, php sees <?php echo "Hello, World!";?> and then gives it to apache saying Hello, World!. Visit the function in your web browser, and what you see will be exactly what your local script sees. However, if php is not turned on to look through files of that type, (IE .html .inc .phps in some cases) you can actually see the code and not the end result, which is what you want.
Dan -----Original Message----- From: Ximon Eighteen [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 03, 2002 5:31 PM To: [EMAIL PROTECTED] Subject: [PHP] using remote code Ignoring the issues of executing untrustworthy code can someone tell me why this won't work and how I can achieve this? Basically there is a remote php file on another web server that has a function in it. I want to execute this function in my own code... I'm guessing this probably won't work but it's a nice idea. The remote function accesses a database on the remote machine and returns an array of information. The more I think about what I'm trying to do the more stupid it seems.... Anyway any attempt to require or include the file works fine but then I can't use the function because it is "undefined". The php.net docs seem to imply that this is possible. Can anyone say if it is possible and if so what I am doing wrong please, ta. -- 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