RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards

From: Date: Tue, 05 Nov 2002 22:47:18 +0000
Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-122882@lists.php.net to get a copy of this message
Do you have telnet access to the server? If so, you could download the standalone CURL program & invoke it via the exec() function call. -- JR > -----Original Message----- > From: Ben C. [mailto:benc@cox.net] > Sent: Tuesday, November 05, 2002 13:19 PM > To: Jaime Bozza; 'Adam Voigt' > Cc: php-general@lists.php.net > Subject: RE: Re: [PHP] Creating SSL Connection to Accept Credit Cards > > > 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 > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#122882) next »