Re: Can I do this?
| From: | John Taylor-Johnston | Date: | Sun, 08 Feb 2004 08:18:49 +0000 |
| Subject: | Re: Can I do this? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-177127@lists.php.net to get a copy of this message | ||
Ah! A little experimenting ... Yes I can :) Answered my own question.
include("http://elsewhere.com/list.php?number=$number");
André Cerqueira wrote:
> John Taylor-Johnston wrote:
>
> > Can I include a script on another server doing this?
> >
> > $sql = 'SELECT * FROM '.$table.' where number like
> > '.$number.';';
> >
> > http://foo.com?list.php?number=16
> >
> > include("http://elsewhere.com/list.php");
> >
> > My $sql is error-ing - obviously.
> > http://elsewhere.com/list.php is not receiving $number. Can I even
> > do this?
>
> No, you cant.
> Even if you could, if the server where the include file is located runs
> PHP, the include file would run there, and you would end up including
> the output of it instead of the code.
> Why would you want to do that? Maybe what you really want to do dont
> need that...
--
John Taylor-Johnston
-----------------------------------------------------------------------------
"If it's not Open Source, it's Murphy's Law or broken."
' ' ' Collège de Sherbrooke
ô¿ô http://www.collegesherbrooke.qc.ca/languesmodernes/
- Université de Sherbrooke
http://compcanlit.ca/
819-569-2064