{"type":"rich","version":"1.0","provider_name":"phorkie","provider_url":"https:\/\/p.cweiske.de\/","title":"pingback library requirements","author_name":"Anonymous","cache_age":86400,"width":900,"height":900,"html":"<!-- embedding all files of https:\/\/p.cweiske.de\/16 -->\n<link rel=\"stylesheet\" href=\"https:\/\/p.cweiske.de\/css\/embed.css\"\/>\n<div class=\"phork\" id=\"16\">\n    <div class=\"phork-file\">\n <div class=\"phork-content\">\n  \n<div class=\"document\">\n\n\n<div class=\"section\" id=\"client\">\n<h1>Client<\/h1>\n<ul class=\"simple\">\n<li>send pingback for given URL to remote URL<\/li>\n<li>use HTTP_Request2, since it allows to use curl if available and others if not<\/li>\n<\/ul>\n<pre class=\"literal-block\">\n$pc = new Pingback_Client();\n$pc-&gt;send($myUrl, $targetUrl);\n<\/pre>\n<p>TODO: error handling. exceptions? simply true\/false with $pc-&gt;getError()?<\/p>\n<\/div>\n<div class=\"section\" id=\"server\">\n<h1>Server<\/h1>\n<ul class=\"simple\">\n<li>register custom handler<\/li>\n<li>register custom validator<\/li>\n<li>provide basic backlinking validator<\/li>\n<\/ul>\n<pre class=\"literal-block\">\n$ps = new Pingback_Server();\n$ps-&gt;registerHandler(array($datastore, 'storePingback'));\n$ps-&gt;registerValidator(array($pingbackValidator, 'checkBlogAge'));\n$ps-&gt;registerValidator(array($pingbackValidator, 'checkFriendliness'));\n$ps-&gt;run();\n<\/pre>\n<\/div>\n<div class=\"section\" id=\"my-solution\">\n<h1>My Solution<\/h1>\n<p><a class=\"reference external\" href=\"https:\/\/github.com\/pear2\/Services_Linkback\">https:\/\/github.com\/pear2\/Services_Linkback<\/a><\/p>\n<\/div>\n<div class=\"section\" id=\"existing-libraries\">\n<h1>Existing libraries<\/h1>\n<ul class=\"simple\">\n<li><a class=\"reference external\" href=\"http:\/\/pear.php.net\/package\/Services_Pingback\">http:\/\/pear.php.net\/package\/Services_Pingback<\/a><ul>\n<li>bad: uses outdated libraries (HTTP_Request v1, XML_RPC v1, Net_URL v1), not E_STRICT compliant<\/li>\n<\/ul>\n<\/li>\n<li><a class=\"reference external\" href=\"https:\/\/github.com\/tedeh\/pingback-php\">https:\/\/github.com\/tedeh\/pingback-php<\/a><ul>\n<li>bad: &quot;Client&quot; (Utility) has no state thus has to re-fetch the remote files again and again (isPingbackEnabled, getPingbackServerURL, isBacklinking)<\/li>\n<li>you have to extend the server to properly use it<\/li>\n<li>no examples<\/li>\n<\/ul>\n<\/li>\n<li><a class=\"reference external\" href=\"https:\/\/github.com\/driedfruit\/php-pingback\">https:\/\/github.com\/driedfruit\/php-pingback<\/a><ul>\n<li>bad: bunch of functions<\/li>\n<\/ul>\n<\/li>\n<li>Zend Framework 1 has nothing<ul>\n<li>there was a proposal, Zend_Service_Linkback, but it was not finished\/included: <a class=\"reference external\" href=\"http:\/\/framework.zend.com\/wiki\/pages\/viewpage.action?pageId=13107298\">http:\/\/framework.zend.com\/wiki\/pages\/viewpage.action?pageId=13107298<\/a><\/li>\n<li><a class=\"reference external\" href=\"http:\/\/www.zendframeworkmagazin.de\/zf\/blog\/pingback-mit-dem-zend-framework-1\">http:\/\/www.zendframeworkmagazin.de\/zf\/blog\/pingback-mit-dem-zend-framework-1<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n\n <\/div>\n <div class=\"phork-meta\">\n  <a href=\"https:\/\/p.cweiske.de\/16\/rev-raw\/7e8da1605fe5e46e2ba714520c1e68e3c0c08242\/phork0.rst\" style=\"float: right\">view raw source<\/a>\n  <a href=\"https:\/\/p.cweiske.de\/16#phork0.rst\">phork0.rst<\/a>\n <\/div>\n<\/div>\n<\/div>\n"}
