If these domains are on the same physical server, include them directly via the full filesystem path. If they are actually on different physical machines, you will need to configure those other machines to let you get the non-parsed PHP code through them. Your problam right now is that the site2.mydomain.com machine is executing the PHP and only giving you the parsed result. You need to configure Apache to not parse the file with PHP when requested by your script.
-Rasmus On 19 Aug 2002, Greg Macek wrote: > Hello, > > I've searched the list and the manual and am still a bit confused. > Here's what I'd like to do. We have a bunch of internal sites that all > use the same username/password. One is already setup with a function to > authenticate this to a database. However, each login page is coming from > a different sub-domain, such as site1.mydomain.com. The login functions > resides in a PHP file on site2.mydomain.com. So it does this: > > <? > // This page on site1.mydomain.com > > include ("http://site2.mydomain.com/functions.php"); > > if (loginUser($username,$password)) { > // do stuff here > // redirect > } > else { ... } > > ?> > > Right now my local script doesn't find the function I'm trying to use. > What am I missing here? Is it not possible to include a php file (and > its functions and variables) across domains? > > - Greg > > > > -- > 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