Posted by Oli Filth on 01/11/06 00:21
Venturer said the following on 10/01/2006 22:01:
> ok i'll explain more...
>
> a script on www.master.com/script.php
>
> contains a list of items:
>
> 1.com
> 2.com
> 3.com
>
> the script.php file is included in a page:
>
> www.2.com/index.php
>
> as
>
> include("http://www.master.com/script.php");
>
> the script.php checks for the domain it is on (which should tell it its
> on www.2.com/index.php) and then makes sure it WONT display its own
> domain in the script.php list... eg it will show 1.com and 3.com but
> not 2.com
>
> Of course what happens is that the domain test comes back as saying its
> on http://www.master.com
>
> How else can I do this and not have to update 50 websites when I want
> to make a common change to one file?
Well, the easiest way is to pass a GET variable which contains the
"local" URL when include()-ing http://www.master.com/script.php, as I
suggested in response to your original post.
However, we might be able to help more if you explain *why* you want to
access a remote script in this way.
P.S. "www.master.com" is a domain, whereas "http://www.master.com" and
"http://www.master.com/script.php" are URLs.
--
Oli
[Back to original message]
|