1. Go to this page and download the library: Download p3k/websub 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/ */
p3k / websub example snippets
$http = new p3k\HTTP('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) p3k-websub/0.1.0 example');
$client = new p3k\WebSub\Client($http);
// Returns false unless both hub and self were found
$endpoints = $client->discover($topic);
// $endpoints['hub']
// $endpoints['self']