Re: [PHP] Re: Post CGI variable to PHP

2002-01-10 Thread Job Miller

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 <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> wrote in
> message
>
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > 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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


__
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Post CGI variable to PHP

2002-01-10 Thread LaserJetter

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" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]