Jump to content

simplexml_load_file


Richard Yates

Recommended Posts

My first stab at connecting to an API with php. The API takes a url and returns an xml file. When I try this:

 

<?php

    $apicall = "https://www.graphicmail.com/[email protected]&Password=x&Function=get_newsletters&SID=0";

    $xml = simplexml_load_file($apicall);

    print_r($xml);

?>

 

My local testing server responds with:

 

Warning: simplexml_load_file() [function.simplexml-load-file]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

 

However, in the php configuration file,  php.ini, I have: 'allow_url_fopen = On' which is what the manual says is all you need for https use in most functions that take urls.

 

The url that is $apicall works correctly when just pasted into the browser. When I try the php code on the production server I get no warning (they are turned off) and no output.

 

Any ideas?

 

 

Link to comment
https://forums.phpfreaks.com/topic/250670-simplexml_load_file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.