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/api.aspx?Username=dyates@salemharvest.org&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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.