Richard Yates Posted November 8, 2011 Share Posted November 8, 2011 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 More sharing options...
silkfire Posted November 8, 2011 Share Posted November 8, 2011 Try enabling php_openssl.dll extension in you php_ini file. Link to comment https://forums.phpfreaks.com/topic/250670-simplexml_load_file/#findComment-1286185 Share on other sites More sharing options...
Richard Yates Posted November 8, 2011 Author Share Posted November 8, 2011 That did it. THANKS! Link to comment https://forums.phpfreaks.com/topic/250670-simplexml_load_file/#findComment-1286194 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.