Re: emulate Post with redirect
| From: | Bobby Patel | Date: | Mon, 06 Jan 2003 16:06:51 +0000 |
| Subject: | Re: emulate Post with redirect | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-130419@lists.php.net to get a copy of this message | ||
I was trying to do it without cURL, since it's not on our server. I guess
I'll just install it, and just use that. I checked out snoopy but when it
gets down to it, it just uses cURL, so I rather just use cURL directly and
cut the fat (of code that is).
"Jason Wong" <php-general@gremlins.biz> wrote in message
news:200301061422.38723.php-general@gremlins.biz...
> On Monday 06 January 2003 14:01, Bobby Patel wrote:
> > Hello, I want to emulate a POST request to Paypal. Originally a POST
> > request is sent from the user (through a form) and the user is
redirected
> > to paypal's site. Now, what I want to do is to emulate a POST request
(so
> > that the surfer can't see some of the hidden fields of the form) and to
> > deter tampering. (If they could see all the fields, they could just
create
> > their own form , and just change the amount).
> >
> > Possible solution:
> > fsockopen to emulate POST, but that doesn;t redirect the user, using
> > header will direct the user to the paypal site, but then I have to use a
> > GET request and then once again variables are visible and modifiable.
> >
> >
> > Desired solution:
> > a PHP script (toPaypal.php, say) that is called when a surfer wants to
buy
> > something for a product for $5 , say.
> > The Product form will direct to the toPaypal.php script that creates a
POST
> > request and sends the request and the surefer to Paypal.
> >
> > Any ideas? or did I just make this confusing? One solution I guess is to
> > just double check the total amount credited to the merchant account
matches
> > the product. But then I ask this question out of curosity.
>
> Have a look at curl and snoopy.
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Remember, drive defensively! And of course, the best defense is a good
> offense!
> */
>