Use classmap autoloader for stapibas classes
[stapibas.git] / README.rst
index 108c90cb4e9c8e64a2bd61628ff9bb22382afba6..fea31c2475a459a41cbad875b19ee6fa476ed437 100644 (file)
@@ -1,64 +1,87 @@
 ********
 stapibas
 ********
-The standalone Pingback server, written in PHP.
+The standalone Linkback server, written in PHP.
 
-Alternative to `Trackback ‘em All`__
+- Receives linkbacks (`webmention`__ and `pingbacks`__)
+- Watches your website's Feed to send out linkbacks to all linked URLs
 
+Alternative to `Trackback ‘em All`__ and `Telegraph`__
+
+__ https://www.w3.org/TR/webmention/
+__ http://www.hixie.ch/specs/pingback/pingback
 __ http://scott.yang.id.au/code/trackback-em-all/
+__ https://telegraph.p3k.io/
 
 
-============
-Dependencies
-============
-- PHP 5.3+
-- PDO
-- `Console_CommandLine`__
-- `Net_URL2`__
-- `HTTP_Request2`__
-- `PEAR2 Services_Pingback`__
-- `SimplePie`__
-
-__ http://pear.php.net/package/Console_CommandLine
-__ http://pear.php.net/package/Net_URL2
-__ http://pear.php.net/package/HTTP_Request2
-__ https://github.com/pear2/Services_Pingback
-__ http://simplepie.org/
-
 =================
-Pingback receiver
+Linkback receiver
 =================
-stapibas receives pingbacks for your website and puts them into a database.
+stapibas receives linkbacks (webmentions + pingbacks) for your website
+and puts them into a database.
+
+It also sends them as email to a configured address.
 
 
 Setup
 =====
-Let your website send out the following HTTP header::
+Let your website send out the following HTTP headers::
 
   X-Pingback: http://stapibas.example.org/xmlrpc.php
+  Link: '<http://stapibas.example.org/xmlrpc.php>; rel="webmention"'
+
+In Apache you can do this with the following configuration::
+
+  Header set X-Pingback "http://stapibas.example.org/xmlrpc.php"
+  Header append Link '<http://stapibas.example.org/xmlrpc.php>; rel="webmention"'
+
+
+Now, whitelist your domain in the database:
+Add an ``lt_url`` of ``https://example.org/%`` in the ``linkbacktargets`` table.
 
 That's all.
 
+.. note::
+   stapibas does not display the linkbacks in any way - you have to do this yourself.
+
+   If you're looking for a ready-made solution, look at the tools listed
+   on https://indieweb.org/Webmention
+
+
 
 ===============
-Pingback sender
+Linkback sender
 ===============
-stapibas is able to send pingbacks out to other websites at behalf of
+stapibas is able to send linkbacks out to other websites at behalf of
 your website.
 
-It does this by watching your website's Atom feed.
+It does this by watching your website's Atom (or RSS) feed.
 Whenever it changes, it fetches the articles that are new or got updated and
 sends out pingbacks to the remote websites.
 
+It only works on links that are inside an ``e-content`` section
+that itself has to be inside a `h-entry`__.
+
+__ http://microformats.org/wiki/h-entry
+
 
 Setup
 =====
-Insert your feed URL in the ``feeds`` database table.
+Add your feed URL::
+
+  $ ./bin/stapibas feed add http://example.org/feed.atom
 
 Whenever you update your website, tell stapibas about it via a
-HTTP POST request::
+HTTP POST request, sending the feed URL::
+
+  $ curl -d url=http://example.org/feed.atom http://stapibas.example.org/request-feed-update.php
+
+This tells stapibas to check this feed the next time the pinger runs.
+
+.. note::
+   stapibas does not check itself if the feed changed!
 
-  $ curl -d url=http://example.org/feed/ http://stapibas.example.org/request-feed-update.php
+   You need to notify it manually.
 
 
 Run the pinger
@@ -69,3 +92,11 @@ extract new URLs from the feed and send pingbacks to them.
 ::
 
    $ php bin/stapibas
+
+
+============
+Dependencies
+============
+- PHP 8.0+
+- PDO
+- PHP libraries that get installed with ``composer install --no-dev``