include() from another sub-domain
| From: | Greg Macek | Date: | Mon, 19 Aug 2002 19:28:50 +0000 |
| Subject: | include() from another sub-domain | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-113252@lists.php.net to get a copy of this message | ||
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