Recipe 13.7. Fetching an HTTPS URL

13.7.1. Problem

You want to retrieve a secure URL.

13.7.2. Solution

Use any of the techniques described in Recipes 13.1 or Recipe 13.2, providing a URL that begins with https.

13.7.3. Discussion

As long as PHP has been built with an SSL library such as OpenSSL, all of the functions that can retrieve regular URLs can retrieve secure URLs. Look for the "openssl" section in the output of phpinfo( ) to see if your PHP setup has SSL support.

13.7.4. See Also

Recipes 13.1 and Recipe 13.2 for retrieving URLs, the OpenSSL Project at http://www.openssl.org/.