RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
| From: | Ben C . | Date: | Tue, 05 Nov 2002 18:19:12 +0000 |
| Subject: | RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-122827@lists.php.net to get a copy of this message | ||
Is there anything else that I can do. I am running PHP 4.1.2 so the fopen() doesn't work and I
donot have support for CURL. Any other suggestions?
>
> From: "Jaime Bozza" <jbozza@thinkburst.com>
> Date: 2002/11/05 Tue PM 01:09:37 EST
> To: "'Ben C.'" <benc@cox.net>, "'Adam Voigt'"
> <adam@cryptocomm.com>
> CC: <php-general@lists.php.net>
> Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
>
> Except that https:// doesn't work with fopen until PHP
> 4.3.0.
>
> Suggestions are only good if they work with a current version of PHP. :)
> (No, I don't consider 4.3.0 current until it's at *least* released)
>
> Regardless, until then, CURL support is probably the way to go.
> Assuming you have curl support, it's fairly straightforward:
>
> ---
> $ch = curl_init("https://somesite.com");
> curl_setopt($ch, CURLOPT_HEADER, 0);
> curl_setopt($ch, CURLOPT_POST, 1);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $authorization_data);
>
> $result = curl_exec($ch);
> $errorstr = curl_error($ch);
> curl_close($ch);
> ---
>
> $result contains the data received and $errorstr contains the error
> message (if any) if it was unsuccessful. Translating $result depends on
> how they return the data.
>
> With the above example, you'll need to have $authorization_data in POST
> format, which really is nothing more than the GET format string.
> (Secure transaction APIs typically don't allow GET)
>
> var=somevalue&var2=somevalue2&var3=anothervalue
>
>
>
>
> > -----Original Message-----
> > From: Ben C. [mailto:benc@cox.net]
> > Sent: Tuesday, November 05, 2002 11:55 AM
> > To: Adam Voigt
> > Cc: php-general@lists.php.net
> > Subject: Re: Re: [PHP] Creating SSL Connection to Accept Credit Cards
> >
> >
> > I am not sure if that is what they want. I will try it and
> > get back. Good suggestion.
> > >
> > > From: Adam Voigt <adam@cryptocomm.com>
> > > Date: 2002/11/05 Tue PM 12:33:00 EST
> > > To: benc@cox.net
> > > CC: php-general@lists.php.net
> > > Subject: Re: [PHP] Creating SSL Connection to Accept Credit Cards
> > >
> > > Like:
> > >
> > > $f =
> > > fopen("https://whatever.com","r")
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>