)
);
}
+
/**
* Verifies that a link from $source to $target exists.
*
}
}
+class PingbackMailer
+ implements \PEAR2\Services\Pingback2\Server_Callback_IStorage
+{
+ public function storePingback(
+ $target, $source, $sourceBody, \HTTP_Request2_Response $res
+ ) {
+ mail(
+ 'New pingback',
+ "A pingback just came in, for\n"
+ . '> ' . $target . "\n"
+ . "from\n"
+ . '> ' . $source . "\n"
+ . "\n\nLove, stapibas",
+ );
+ }
+}
+
$s = new \PEAR2\Services\Pingback2\Server();
$s->addCallback(new PingbackStorage($db));
+$s->addCallback(new PingbackMailer());
$s->run();
?>