You want to retrieve a secure URL.
Use any of the techniques described in Recipes 13.1 or Recipe 13.2, providing a URL that begins with https.
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/.