Re: fsockopen question
| From: | Nuno Silva | Date: | Thu, 26 Apr 2001 21:09:15 +0000 |
| Subject: | Re: fsockopen question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50502@lists.php.net to get a copy of this message | ||
Hi,
the way i would do it looks like this:
- setup stunnel (www.stunnel.org) to listen to port 10443 in the 127.0.0.1 interface and forward that to www.myprovider.com
- the php script would connect to 127.0.0.1:10443 using plain text
- that's it, easy and clean! :)
stunnel will hapilly forward the 127.0.0.1:10443 to the destination encripted and you will have to deal with the easy part of it! ;)
Regards,
Nuno Silva
Michael Conley wrote:
I am looking to process credit card transactions on my site. In order to do this, I need to open a socket to a particular URL. I then submit an XML string to them. They process the string and send me a response. I am going to a certain (secure) location on the site of my credit card processor (https://www.myprovider.com/XMLSubmit/processtrans.asp) and then submit the XML string. After I submit all of the XML, the processor will give me a response as to whether or not the transaction is approved. How do I send the XML string to the above URL? When I use fsockopen, it doesn't like anything other than an IP address or a host name (ie www.myprovider.com). I don't even really see where to force this to go over HTTPS. I set the port to 443, but need to be sure that the data going across uses SSL. How do I send this XML string over HTTPS to https://www.myprovider.com/XMLSubmit/processtrans.asp? attachment.txt Content-Type: text/plain