Re: Re: Post CGI variable to PHP
| From: | Job Miller | Date: | Thu, 10 Jan 2002 23:09:01 +0000 |
| Subject: | Re: Re: Post CGI variable to PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-80107@lists.php.net to get a copy of this message | ||
to post to a PHP script from within perl, you would
either define a form in the perl script that has a
submit button whose action is a php script, or you can
use the LWP module in Perl to generate a POST for you.
this will post the stuff to the php script and fetch
the results. it isn't a redirect with hidden args.
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(POST =>
'http://www.perl.com/cgi-bin/BugGlimpse');
$req->content_type('application/x-www-form-urlencoded');
$req->content('match=www&errors=0');
my $res = $ua->request($req);
print $res->as_string;
Job
--- LaserJetter <newsaddress@saracenvsu.org.uk> wrote:
> If you send a form on an HTML page using GET then
> the variables show up in
> the URL. If you send it using POST then they dont.
> With PHP 4.1.0 even if the variable is typed in the
> URL, PHP should only
> read the real variables which were submitted if
> $_GET[$varname] is used (or
> whatever it is!)
> I have no idea how to combine PHP and Perl - not
> something I've done.
>
> LJ
>
> Benjamin Bostow" <jamin4az@yahoo.com> wrote in
> message
>
news:20020110213735.41993.qmail@web14008.mail.yahoo.com...
> > I am trying to pass variables from a CGI/Perl
> script
> > to a php page. I know how to pass it through the
> url
> > (i.e. page.php?tmp=[var1]&tmp2=[var2]) but need to
> > know how to pass it so that the information does
> not
> > show up in the url.
> >
> > Benjamin
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE video emails in Yahoo! Mail!
> > http://promo.yahoo.com/videomail/
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/