PHP code example of weebly / ghost-io-php
1. Go to this page and download the library: Download weebly/ghost-io-php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
weebly / ghost-io-php example snippets
use GhostIO\GhostIO;
$ghost = new GhostIO(
'https://your-blog.ghost.io', // This is the base url for your blog
'[email protected]', // email (username) of the user that will do the API requests
'password', // The user password
'ghost-frontend', // The client id
'the-client-secret' // The client secret
);
$res = $ghost->getAllPosts(); // retrieve all posts from the ghost server