title: Problems getting XML content via https using SimpleXML and PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2305954/how-to-enable-https-stream-wrappers">How to enable HTTPS stream wrappers</a>  </p>
  </blockquote>
  
  
  
  <p>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?</p>
  
  <p>Example XML (url):</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;calendars&gt;
    &lt;calendar accommodation_id="1049165"&gt;
      &lt;day date="2012-08-09" vacancy="false" minimum_nights="7" arrival_day="true"/&gt;
      &lt;day date="2012-08-10" vacancy="false" minimum_nights="3" arrival_day="true"/&gt;
      &lt;day date="2012-08-11" vacancy="false" minimum_nights="3" arrival_day="true"/&gt;
      &lt;!-- ... --&gt;
      &lt;day date="2014-01-31" vacancy="true" minimum_nights="3" arrival_day="true"/&gt;
    &lt;/calendar&gt;
  &lt;/calendars&gt;
  </code></pre>
  
  <p>Example code:</p>
  
  <pre><code>$xml2 = file_get_contents('');
  $availability = new SimpleXMLElement($xml2);
  </code></pre>