indieweb / push
A set of classes for dealing with Pubsubhubbub feeds
Installs: 6 290
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 13
Forks: 2
Open Issues: 1
This package is not auto-updated.
Last update: 2024-12-21 13:26:20 UTC
README
A composer-enabled package containing various PHP classes for using Pubsubhubbub.
Current contents:
- Josh Fraser's PHP PuSH publishing client
Installation
Install using Composer. If you don't already have composer, download it per their instructions. Then:
-
Add
indieweb/push
to your project'scomposer.json
file, so it looks a bit like this:{ "require" : { "indieweb/push": "*" }, "minimum-stability": "dev" }
If you've never used composer, this is just specifying that your project needs the indieweb/push package in order to work, it doesn't matter which version you get, and it's all right to use packages which are in development.
-
Run
php composer.phar update
-
Provided there were no errors, you should now have indieweb/push installed
Usage
indieweb/push supports psr-0 autoloading, so using the classes is easy provided you're familiar with PHP namespaces.
Say you want to use the PuSH publisher (class for pinging hubs to let them know of updates):
<?php
// This script pings a hub
use indieweb\PuSH\Publisher;
$p = new Publisher('http://pubsubhubbub.appspot.com/publish');
$p -> publish_update('http://domain.tld/path/to/your/feed.atom');
// EOF
TODO: Add more usage examples and documentation as more classes are added