What’s your URL? This is the easiest way for others to help you
- **What version of Ghost are you using?
V3 Hosted by Ghost Pro
- How was Ghost installed and configured? Ghost Pro
- What Node version, database, OS & browser are you using? Ghost Pro
- What errors or information do you see in the console? No errors
- What steps could someone else take to reproduce the issue you’re having? See the URL above
<?php $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, 'https://stout-bowman-associates- llc.ghost.io/ghost/api/v3/content/tags/?key=73af8261b1543c9a9446538e98&fields=name,slug'); $result = curl_exec($curl); print_r($result); curl_close($curl); ?>
You can see the result on the test PHP page. When I place this reponse from the Content API into an online JSON validator, it complains that it is not valid JSON, so that may be why I can’t get the PHP JSON functions to operate on the response. I need to extract the name of the tag and the slug in order to build the list of tags on the page.
Also, if you look at the List of Posts section, you’ll see that, while I request the post with:
curl_setopt($curl, CURLOPT_URL, 'https://stout-bowman-associates-llc.ghost.io/ghost/api/v3/content/posts/?key=73af8261b1543c9a9446538e98&fields=title,published_at,plaintext,url');
I am not getting the plaintext for the posts. Has anyone used PHP to retrieve this data from the Content API and can show me an example I can use? Thanks in advance.