PHPackages                             jacobbennett/phpghostpost - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. jacobbennett/phpghostpost

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

jacobbennett/phpghostpost
=========================

A PHP Library for creating usable Post objects from Ghost RSS feeds

0.1(11y ago)122[1 issues](https://github.com/JacobBennett/PHPGhostPost/issues)MITPHPPHP &gt;=5.3.0

Since Sep 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/JacobBennett/PHPGhostPost)[ Packagist](https://packagist.org/packages/jacobbennett/phpghostpost)[ RSS](/packages/jacobbennett-phpghostpost/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHPGhostPost
============

[](#phpghostpost)

### Pull Ghost blog post info from Ghost RSS XML Feed

[](#pull-ghost-blog-post-info-from-ghost-rss-xml-feed)

This library will read an RSS feed from your Ghost blog and return friendly Post objects that you can use to display information about your posts on a PHP page.

Installation
------------

[](#installation)

Begin by installing this package through Composer. Edit your project's `composer.json` file to require `jacobbennett/ghostxml`.

```
"require": {
	"jacobbennett/phpghostpost": "dev-master"
}

```

Next, update Composer from the Terminal:

```
composer update

```

Finally make sure to place a `use` statement at the top of your `PHP` file that will be using the library.

```
use jacobbennett\phpghostpost\PostCreator;

```

That’s all. You should now be able to use the PHPGhostPost Library.

Usage
-----

[](#usage)

```
use jacobbennett\phpghostpost\PostCreator;

// Set RSS feed URL
$feedUrl = 'http://youblog.ghost.io/rss/';

// Instantiate a new Post Creator
$PostCreator = new PostCreator($feedUrl);

// Grab and parse the RSS feed into an array of Post objects
$posts = $PostCreator->getPosts();

// Loop through posts and call properties or methods on each
// To display desired information
foreach($posts as $post){
	echo "" . $post->title . "";
	echo "Published " . $post->date_ago();
}
```

Post Object methods and properties
----------------------------------

[](#post-object-methods-and-properties)

Once you have your array of `Post` objects returned, here are the methods and properties you can call on each.

### Properties

[](#properties)

- `title` - Title of the post
- `description` - Text of post (stripped of html tags)
- `image` - URI of first image in post
- `link` - Permalink to the post
- 'date' - Timestamp of publish date

### Methods

[](#methods)

- `shortDesc($limit)` - Return description limited by character count, rounded to end of a word
- `date_ago` - Return human readable time-ago string

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4248d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50837c1464ddeb5a0d132c151fe7cde07e050e67206d50470d92f1e72cc7179e?d=identicon)[JacobBennett](/maintainers/JacobBennett)

---

Top Contributors

[![JacobBennett](https://avatars.githubusercontent.com/u/1517011?v=4)](https://github.com/JacobBennett "JacobBennett (10 commits)")

---

Tags

phpxmlrssblogGhost

### Embed Badge

![Health badge](/badges/jacobbennett-phpghostpost/health.svg)

```
[![Health](https://phpackages.com/badges/jacobbennett-phpghostpost/health.svg)](https://phpackages.com/packages/jacobbennett-phpghostpost)
```

###  Alternatives

[goetas/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

493.3k](/packages/goetas-xsd2php-runtime)[bupy7/xml-constructor

The array-like constructor of XML document structure.

1337.9k](/packages/bupy7-xml-constructor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
