I have been using file_get_contents() to grab the contents of a site for years. Recently, they updated their site to HTTPS and file_get_contents() stopped working.
My connections to the site return this error:
Unknown SSL protocol error in connection to www.example.com:443 * Closing connection 0I've read previous questions and tried marked solutions, but nothing has worked.
I have not added extension=php_openssl.dll and allow_url_include = On to PHP.ini as per this as this particular site is on a shared host and the hosting company does not allow the PHP.ini filed to be edited, although they may already be enabled by default.
I tried other HTTPS sites, and some work and some do not, and I'm not sure why.
phpinfo() shows:
curlcURL support enabledcURL Information libcurl/7.36.0 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 libssh2/1.8.0opensslOpenSSL support enabledOpenSSL Version OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008