[ic] Embedded PHP pages

Elver Loho elver.loho at gmail.com
Thu Feb 23 09:04:01 EST 2006


On 2/23/06, Peter <peter at pajamian.dhs.org> wrote:
> On 02/23/2006 04:37 AM, Elver Loho wrote:
> > Hi!
> >
> > I'd like to embed an existing PHP-based forum into an Interchange page.
> >
> > I can include a PHP page's output using:
> >
> > [get-url url="http://ourserver.tld/something.php" strip="1"]
> >
> > Now I also want to pass all the GET and POST variables to it.
> >
> > [get-url url="http://ourserver.tld/something.php" content="foo=[cgi
> > foo]&bar=[cgi bar]" method="POST" strip="1"]
>
> Try something like this (untested):
>
> [calc]
> my @out;
> while (my($key,$value) = each %$CGI) {
>         push(@out,"$key=$_") foreach (split(/\0/,$value));
> }
> $content = join('&', at out);
> undef;
> [/calc]
> [get-url url="http://ourserver.tld/something.php" content=`$content`
> method="POST" strip="1"]

Thank you! That worked on the first try :)


Elver



More information about the interchange-users mailing list