You're gonna have to use PHP's curl family of functions. Although PHP's fopen() function can open an HTTP web page, the current version cannot open HTTPS web pages.
Take a look at my FAQ on the subject: faq434-2502 ______________________________________________________________________
TANSTAAFL!
OpenSSL is merely an open-source implementation of the encryption libraries necessary to support SSL and other encryption functions. But in order to use OpenSSL with PHP, you need some kind of interface to that library. CURL is one interface.
PHP supports HTTPS through it's fopen() function starting with 4.3.0. However, that version is currently pre-release. ______________________________________________________________________
TANSTAAFL!
You have two web servers, "A" and "B", and a web browser which is pointing to a PHP script on "A". The script on "A" needs to get data from "B" to the browser.
There are two ways to accomplish this. The script on "A" can use header("Location:..." to redirect the browser to the appropriate place on "B", and the browser will retrieve the information from there.
But you can also have "A" fetch the information itself from "B" then pass the data to the browser without redirection. The script on "A" can act as a proxy to the information on "B".
An example of this is e-commerce credit-card processing systems. I know about Authorize.net, so I'll talk about them. You can upload pages to Authorize.net's servers, and when your site needs to charge, redirect the browser to your pages on Authorize.net's servers. This does, however, leave a trail through the browser's history, and sometimes it's hard to get the look and feel consistent.
You can also have your script collect the card data, pass the card data to Authorize.net's servers directly, receive the authorization information from the server, and display it to the browser using server-to-server HTTPS. All from within a single script. Your customer has never left your site, you can easily keep look-and-feel consistent, and it keeps users from knowing which processing system you use. ______________________________________________________________________
TANSTAAFL!
That means there are 2 method to connect a SSL site.
1. Redirect (like code above)
2. Keep browser stay at some url and we will connect the SSL site through a tunnel called "curl". Then, we can keep all the things.
I think that curl is just like a command line browser (+ftp and more). And it's able to perform method 2.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.