pingback library requirements

revision 053e7e24a0c20161b825c309eb7dc9d787cca28f

raw

phork0.rst

Client

  • send pingback for given URL to remote URL
  • use HTTP_Request2, since it allows to use curl if available and others if not
$pc = new Pingback_Client(); $pc->send($myUrl, $targetUrl);

TODO: error handling. exceptions? simply true/false with $pc->getError()?

Server

  • register custom handler
  • register custom validator
  • provide basic backlinking validator
$ps = new Pingback_Server(); $ps->registerHandler(array($datastore, 'storePingback')); $ps->registerValidator(array($pingbackValidator, 'checkBlogAge')); $ps->registerValidator(array($pingbackValidator, 'checkFriendliness')); $ps->run();

Existing libraries

System Message: WARNING/2 (<stdin>, line 27)

Bullet list ends without a blank line; unexpected unindent.

-- bad: uses outdated libraries (HTTP_Request v1, XML_RPC v1, Net_URL v1), not E_STRICT compliant - https://github.com/tedeh/pingback-php -- bad: "Client" (Utility) has no state thus has to re-fetch the remote files again and again (isPingbackEnabled, getPingbackServerURL, isBacklinking) -- you have to extend the server to properly use it -- no examples - https://github.com/driedfruit/php-pingback -- bad: bunch of functions

History