Click here to get back home

Cross domain include()?

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Cross domain include()? Ciaran 07-14-2008
Get Chitika Premium
Posted by Ciaran on July 14, 2008, 5:19 pm
Please log in for more thread options
Hi,
Can someone please outline the safest and easiest way to import some
code from another domain and run it?
Thanks,
Ciaran

Posted by Michael Fesser on July 14, 2008, 8:16 pm
Please log in for more thread options
I wrote:

>> The only sitation where this makes sense is if the various domains are
>> hosted on the same server under the same user account. Then of course
^^^^^^^^^^^^^^^^^^^^^^^^^
>> you can share a single CMS instance between the different sites.

You wrote:

>I tend to agree with you, but there likely always are a few
>exceptions. I have 2 domains, one with a subdomain, on the same
^^^^^^^^^^^
>server, and sometimes share things without problems. This usually
^^^^^^

Micha

Posted by C. (http://symcbean.blogspot.c on July 15, 2008, 8:36 am
Please log in for more thread options
> .oO(Ciaran)
>
> >Can someone please outline the safest and easiest way to import some
> >code from another domain and run it?
>
> What's the reason for this? It will be insecure and slow.
>

Insecure?

No, but it does potentially open a new vector for attacks.

Slow?

Yes, but it might still be faster than an alternative approach.

For preference I would advise using rsync (preferably over ssh) to
replicate the code, but there are scenarios where this is a valid
approach (but if you understand the context where this is appropriate
then I'd expect that you wouldn't need to ask the original question).

In case the context is appropriate for the solution, it would probably
be more appropriate to use a caching copier to replicate the file
locally and include it from there.

C.

Posted by burgermeister01@gmail.com on July 15, 2008, 3:57 pm
Please log in for more thread options
> Hi,
> Can someone please outline the safest and easiest way to import some
> code from another domain and run it?
> Thanks,
> Ciaran

I'm not sure if I'm thinking about this on the same level as you, but
here is a thought:


If these PHP scripts you want to share among sites are all on the same
server, why not just change the include path in the php.ini file to
and upper-level directory that contains the common script files or
codebase? Check this out to get an idea of what I'm talking about (of
course this page speaks to an actualy PHP command, whereas I'm talking
about actually editing your config file in a permanant kind of way;
it's the same basic premise though):
http://us3.php.net/manual/en/function.set-include-path.php

Similar ThreadsPosted
Cross-Domain Cookies September 10, 2004, 11:52 am
Whats the cross domain cookies February 12, 2008, 3:53 pm
kostenlose web site registrierungsstelle domain com in domain registrieren web site de email domain kostenlos 1 May 13, 2008, 10:37 am
Accessing cookies after domain has been mapped to another domain/folder February 26, 2005, 10:58 pm
cross-compiling with phpize November 14, 2006, 3:26 pm
Re: Does MD5 work cross-platform? November 23, 2007, 2:11 pm
Re: Does MD5 work cross-platform? November 23, 2007, 2:13 pm
Does MD5 work cross-platform? November 23, 2007, 10:47 am
PHP code cross referencer (phpxref) March 5, 2007, 5:45 am
Server Push - Cross-Platform? December 29, 2007, 11:29 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap