{"id":13312273,"url":"https://github.com/cweiske/phubb","last_synced_at":"2025-08-20T05:17:20.587Z","repository":{"id":66261027,"uuid":"32827481","full_name":"cweiske/phubb","owner":"cweiske","description":"PHP WebSub server. Mirror of http://git.cweiske.de/phubb.git/","archived":false,"fork":false,"pushed_at":"2020-03-07T18:01:03.000Z","size":80,"stargazers_count":27,"open_issues_count":2,"forks_count":6,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-07-27T02:55:03.585Z","etag":null,"topics":["indieweb","php","websub-hub"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cweiske.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-03-24T21:56:20.000Z","updated_at":"2024-02-27T13:34:52.000Z","dependencies_parsed_at":"2023-03-13T20:30:16.413Z","dependency_job_id":null,"html_url":"https://github.com/cweiske/phubb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cweiske/phubb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphubb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphubb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphubb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphubb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cweiske","download_url":"https://codeload.github.com/cweiske/phubb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cweiske%2Fphubb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271268859,"owners_count":24730026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["indieweb","php","websub-hub"],"created_at":"2024-07-29T18:03:37.998Z","updated_at":"2025-08-20T05:17:20.568Z","avatar_url":"https://github.com/cweiske.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"*************************\nphubb - PHP WebSub server\n*************************\n\nA WebSub__ server written in PHP, ready to be run on your own server.\n\nUse it to instantly notify subscribers about updates on your blog's feed,\nyour website's HTML pages or any other HTTP-accessible resources.\n\nWork in progress. Basic functionality is working.\n\nWebSub was formerly called PubSubHubbub.\n\n__ https://www.w3.org/TR/websub/\n\n.. contents::\n\n\nWhat works / Features\n=====================\n- Subscribing to a topic\n- Notifying the hub about a topic update\n\n  - Wildcard URLs supported (with ``*``).\n    All matching subscribed topics are then checked if they changed and\n    notifications are sent out.\n    Wildcards in domain or scheme are not allowed.\n- Sending notifications to subscribers\n\n  - As many worker-processes as you want to speed it up\n  - Notifications get only sent when lease time is \u003e= NOW()\n  - Notifications get only sent when the content changed.\n    phubb uses etag, last modified and a hash on the content to check that.\n- Re-pinging a subscriber when it failed (exponential back-off)\n- Logging\n- Re-connecting to DB if we had a timeout\n- Subscriber count image (``counter.php?topic=$url``)\n\n\nDependencies\n============\n* PHP\n* PDO\n* PHP Gearman extension\n* Gearman job server, ``gearman-job-server``\n* Monolog\n\n\nInstallation\n============\n#. Point the web server's document root to the ``www/`` directory.\n#. Create a new MySQL database and import the schema from ``data/schema.sql``.\n   Database host and username/password/db name can be adjusted by copying\n   ``data/phubb.config.php.dist`` to ``data/phubb.config.php`` and\n   adjusting it to your needs.\n#. Install dependencies::\n\n     $ composer install\n\n#. Run the worker process ``bin/phubb-worker.php``\n#. Let ``bin/phubb-cron.php`` be run by cron every minute.\n\nThe hub URL is at ``http://$domain/hub.php``.\n\n\nSystem service\n--------------\nWhen using systemd, you can let it run multiple worker instances when\nthe system boots up:\n\n#. Copy files ``data/systemd/phubb*.service`` into ``/etc/systemd/system/``\n#. Adjust user and group names\n#. Enable three worker processes::\n\n     $ systemctl daemon-reload\n     $ systemctl enable phubb@1\n     $ systemctl enable phubb@2\n     $ systemctl enable phubb@3\n     $ systemctl enable phubb\n     $ systemctl start phubb\n#. Now three workers are running. Restarting the ``phubb`` service also\n   restarts the workers.\n\n\nNotifying the hub about an update\n=================================\n\nSend a POST request with the following data::\n\n    hub.mode=publish\n    hub.url=http://topic-url.example.org/\n\nExample::\n\n    $ curl -d hub.mode=publish -d \"hub.url=http://blog.example.org/feed\"\\\n        http://phubb.example.org/hub.php\n\nor, to automatically publish all modified URLs in that path::\n\n    $ curl -d hub.mode=publish -d \"hub.url=http://blog.example.org/*\"\\\n        http://phubb.example.org/hub.php\n\n\nTesting\n=======\nTasks can be sent via the ``test-task.php`` script to the worker.\n\nVerify a subscription::\n\n  $ ./bin/test-task.php verify http://phubb.bogo/client-callback.php http://www.bogo/tagebuch/feed/ subscribe 3600 mysecret\n\nPublish an update::\n\n  $ ./bin/test-task.php publish http://www.bogo/tagebuch/feed/\n\nNotify subscriber::\n\n  $ ./bin/test-task.php notifysubscriber http://www.bogo/tagebuch/feed/ 1 55140a8d865a9\n\n\nReferences\n==========\n* https://www.w3.org/TR/websub/\n* https://pubsubhubbub.googlecode.com/git/pubsubhubbub-core-0.4.html\n\n\nTODO\n====\n- stats\n- require domain registration before being able to publish\n\n  - check if URL topic URL has hub link (and self link)\n- do not allow subscriptions for urls that are not registered\n- custom user agent when fetching URLs\n\n\nSource code\n===========\nphubb's source code is available from http://git.cweiske.de/phubb.git\nor the `mirror on github`__.\n\n__ https://github.com/cweiske/phubb\n\n\nLicense\n=======\nphubb is licensed under the `AGPL v3 or later`__.\n\n__ http://www.gnu.org/licenses/agpl.html\n\n\nAuthor\n======\nphubb was written by `Christian Weiske`__.\n\n__ http://cweiske.de/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcweiske%2Fphubb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcweiske%2Fphubb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcweiske%2Fphubb/lists"}