Andrew:
As already mentioned, your curl call seems to be returning FALSE. It also appears than when you try to create a SimpleXML element with a boolean FALSE that it throws the exception you are seeing. I have also had problems accessing APIs via curl when on my localhost. I was able to solve it by adding this code:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_DNS_USE_GLOBAL_CACHE, false);
curl_setopt($ch, CURLOPT_DNS_CACHE_TIMEOUT, 2);
Also try adding this, although for my script it was not necessary:
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
Related Posts:
- How do I comment out a block of tags in XML?
- What does
- How to use XPath contains() here?
- Looking for a clear description of Excel’s .xlsx XML format
- Parse XML using JavaScript [duplicate]
- (Python) AttributeError: ‘NoneType’ object has no attribute ‘text’
- XSLT-FO for-each
- java.net.MalformedURLException: no protocol
- Meaning of –
- XSLT for each loop on simple XML
- Is XML a programming language?
- XML Parsing Error: not well-formed
- XPath: Get parent node from child node
- What is the difference between Inclusive and Exclusive OR?
- Manifest Merger failed with multiple errors in Android Studio
- xmlns, xmlns:xsi, xsi:schemaLocation, and targetNamespace?
- How can I escape “&” in XML?
- How to fix error: The markup in the document following the root element must be well-formed
- What’s “tools:context” in Android layout files?
- How to add a newline (line break) in XML file?
- Error -1072896636 “DTD Prohibited” when opening xml file in Excel, what do I do?
- How to define xsi:type as an attribute in XML-schema?
- What are invalid characters in XML
- How to implement if-else statement in XSLT?
- The ‘packages’ element is not declared
- Getting attribute using XPath
- understanding position() function in XSLT
- android.support.design.widget.CoordinatorLayout error
- How to parse XML in Bash?
- YAML compared to XML
- URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs) in applicationContext.xml
- Import WordPress xml file larger than 8mb
- parse XML from URL (via SOAP)
- How can I bulk update all posts without making changes?
- Problems with creating hook that updates XML
- Features in Houzez are not loading in Backend from API
- WP All Import: Feeds of Feeds [closed]
- Is there an XML Web Service that can get posts, categories and other data from the site?
- Work with xml file and WordPress
- Moving WordPress to a different directory – update XML Post File?
- WordPress importer / problem with images
- I need a standalone script in web root but still have access to the database
- stop duplicate post
- Importing feeds with PHP
- Create XML sitemap in wordpress
- How to make an xml file (just the xml file) available at a specific url?
- problem of path with xml file
- xml generator script wordpress [closed]
- How to parse XML and count instances of a particular node attribute?
- ImageView in circular through XML
- javax.xml.bind.UnmarshalException: unexpected element (uri:””, local:”Group”)
- org.xml.sax.SAXParseException: Content is not allowed in prolog
- Cannot resolve symbol ‘button’ -Android Studio
- Why this line xmlns:android=”http://schemas.android.com/apk/res/android” must be the first in the layout xml file?
- How do I escape ampersands in XML so they are rendered as entities in HTML?
- The entity name must immediately follow the ‘&’ in the entity reference
- android.content.res.Resources$NotFoundException: String resource ID #0x0
- XML schema error – root element of a w3c xml schema
- XML has empty body?
- What to use instead of “addPreferencesFromResource” in a PreferenceActivity?
- WordPress WXR Specification
- When importing – failed to import: Invalid post type feedback
- Plugin or advice on how to parse XML in real-time?
- Should I store external API data in my WP database or keep it as a transient?
- How to read the xml file in wordpress?
- How do you get all the urls of images attached to a post?
- Importing WordPress Attachments Into Custom Directories In wp-content/uploads/
- What server settings are required to import WordPress XML file
- How to duplicate a curl XML request using HTTP API?
- How can I process xml file on upload?
- How to limit the content coming from wordpress shortcodes?
- Output and filter data from a XML url
- How to make a XML/PHP file returning custom field data from page
- How to block XML-RPC attack?
- XML-code sent via the POST method to the URL (API) [closed]
- WP http XML response HTML encoding and image display problems
- Query posts and return XML
- wp_get_attachment_url images in wrong order [closed]
- SOAP Request/Parsing XML From wp_send_json_success
- Add valid XHTML closing img tags to WordPress galleries
- RSS/Atom feeds invalid, “Mismatched tag” errors
- WordPress content on non-WP site residing on a remote domain — how to display posts?
- How can transfer get so large when exporting data (15-16MB to over 10GB)
- Get Post ID as a separate RSS feed item
- How do you code a featured image into an XML as a jpg link, instead of using a data-id number?
- WordPress xml import too slow
- XML FOLDER – wp_insert_post – how to assign XML variables to post
- Create Post Types from a XML url (Real Estate website)
- Extract XML/JSON element from Zillow API response and populate into Gravity Forms field
- WordPress sitemap “Extra content at the end of the document”
- How do I get data from my database into my Custom Export Field
- Creating a WordPress addon for ContactForm7 submission (.XML file export)
- How can I get post text from all posts on a WordPress news site?
- Converting restricted html in comments to bbcode
- Serve content from centralized location
- What method should I use to store my plugin data (multi level menus with options on each item)
- Make posts automatically from an Online XML file through wp cron job
- I’m think I’ve found a bug with JetPack 1.7 [closed]
- WP-all-import problems with large input file [closed]
- How to import data from another website using an API link?