Possible Duplicate:
How to enable HTTPS stream wrappers
I'm using simple XML to get content from an API. Usually I have no problems but now the URL is HTTPS it doesn't seem to work. Is there anyway around this?
Example XML (url):
<?xml version="1.0"?>
<calendars>
<calendar accommodation_id="1049165">
<day date="2012-08-09" vacancy="false" minimum_nights="7" arrival_day="true"/>
<day date="2012-08-10" vacancy="false" minimum_nights="3" arrival_day="true"/>
<day date="2012-08-11" vacancy="false" minimum_nights="3" arrival_day="true"/>
<!-- ... -->
<day date="2014-01-31" vacancy="true" minimum_nights="3" arrival_day="true"/>
</calendar>
</calendars>
Example code:
$xml2 = file_get_contents('');
$availability = new SimpleXMLElement($xml2);
You are using the XML API of the
www.casapilot.com
website.The API is via HTTPS, one example URI is:
For HTTPs to work, PHP needs the openssl extension. The information is given on the related Stream Wrapper Page:
The openssl extension is then used for all HTTPS "files" transparently with the stream-wrapper for all URIs starting with
https://
.See as well the duplicate question: