Use the cURL extension with an HTTPS URL:
$c = curl_init('https://secure.example.com/accountbalance.php'); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); $page = curl_exec($c); curl_close($c);
To retrieve secure URLs, the cURL extension needs access to an SSL library, such as OpenSSL. This library must be available when PHP and the cURL extension are built. Aside from this additional library requirement, cURL treats secure URLs just like regular ones. You can provide the same cURL options to secure requests, such as changing the request method or adding POST data.
The OpenSSL Project at http://www.openssl.org/.
Copyright © 2003 O'Reilly & Associates. All rights reserved.