Index of /utilities/cgi/pingback-proxy

      Name                        Last modified      Size  Description
Parent Directory - client 2007-10-09 18:58 3.3K A pingback client client-proxy 2007-10-09 18:58 3.4K A proxy to gateway HTTP GET requests into XML-RPC POST pingback requests client-proxy.html 2002-11-26 17:30 449 A proxy to gateway HTTP GET requests into XML-RPC POST pingback requests - form-based front end client-proxy.pl 2007-10-09 18:58 3.4K A proxy to gateway HTTP GET requests into XML-RPC POST pingback requests - source code client.html 2002-12-20 06:21 605 A pingback client - form-based front end client.pl 2007-10-09 18:58 3.3K A pingback client - source code pingback-to-trackback 2007-10-09 18:59 5.1K A pingback server which gateways pings to a trackback server pingback-to-trackback.pl 2007-10-09 18:59 5.1K A pingback server which gateways pings to a trackback server - source code server-to-get-proxy 2007-10-09 18:59 3.2K A proxy to gateway XML-RPC POST pingback requests into HTTP GET requests with parameters server-to-get-proxy.pl 2007-10-09 18:59 3.2K A proxy to gateway XML-RPC POST pingback requests into HTTP GET requests with parameters - source code server-to-mail-proxy 2002-09-09 13:33 3.3K A proxy to gateway XML-RPC POST pingback requests into e-mails server-to-mail-proxy.pl 2002-09-09 13:33 3.3K A proxy to gateway XML-RPC POST pingback requests into e-mails - source code server-to-referrer-proxy 2007-10-09 18:59 2.9K A proxy to gateway XML-RPC POST pingback requests into HTTP GET requests with referrers server-to-referrer-proxy.pl 2007-10-09 18:59 2.9K A proxy to gateway XML-RPC POST pingback requests into HTTP GET requests with referrers - source code trackback-to-pingback 2015-05-31 20:28 2.8K A trackback server which gateways pings to a pingback server trackback-to-pingback.pl 2015-05-31 20:28 2.8K A trackback server which gateways pings to a pingback server - source code
Pingback Proxies
================

Client
------

This first script isn't actually a proxy per se, it's a bone fide
pingback client. You invoke it with a simple GET or POST request
containing one or two arguments:

   permalink
      The URI of the post whose content will be processed.

   content
      The content to process. If absent, the permalink will be fetched
      instead and it will be treated as the content to process.

This client will then treat the content as HTML, find all the href=""
attributes (using brain dead regexp parsing), fetch each one to see if
there is a pingback server there, and pingback each of them.


Client Proxy
------------

You invoke this proxy with a simple GET request containing two
arguments:

   source
      The URI of the post containing the link.

   target
      The URI of the post to which the source links.

For example, the following URI:

   http://software.hixie.ch/utilities/cgi/pingback-proxy/client-proxy?source=http%3A%2F%2Fwww%2Edummy%2Dblog%2Eorg%2F%3Fstart%3D1031438984%26count%3D1&target=http%3A%2F%2Fwww%2Edummy%2Dblog%2Eorg%2F%3Fstart%3D1031438739%26count%3D1

...links two posts on http://www.dummy-blog.org/.

This proxy fetches the target page, searches it for a relevant <link>
header, and, upon finding one, contacts the relevant server via
XML-RPC, giving it the source and target URIs.

If the response is successful, the response code will be 202 Accepted.
The output from this script is in text/plain format. The first line
contains either 'Client Error', 'Server Error' or 'Done'. If the
string is 'Client Error' then something was wrong with the request, if
the string is 'Server Error' then either there was a problem
contacting the server or the server returned an error, and if the
string is 'Done' then the result was successful. The second line
contains more details.

This proxy should be used by clients who are unable to implement
XML-RPC but wish to be pingback-enabled. For each link that the client
wishes to ping, it need merely invoke this script as described above.

Note: this proxy also supports POST requests (in multipart/form-data
and application/x-www-urlencoded formats) so you can use POST if you
write a form that uses this script.


Server Proxy: Get with Parameters
---------------------------------

This proxy implements an XML-RPC to HTTP GET gateway for pingback. It
expects to be called as:

   http://software.hixie.ch/utilities/cgi/pingback-proxy/server-to-get-proxy/uri-of-server

...with the method name 'pingback.ping' and the two XML-RPC arguments
representing the source and target respectively.

The "uri-of-server" string is replaced with the URI of the HTTP GET
pingback server. This server is called, with a query string containing
two parameters, "source" and "target", the two arguments passed to the
pingback.ping method.

This server can be used by pages which do not have an XML-RPC server
but wish to be pingback-enabled, and are able to provide a GET script
to handle the pingback requests. For example, if the GET pingback
server was called:

   http://www.example.net/pingback.cgi

...then instead of including a link to this GET server, the link
would be:

   <link rel="pingback" href="http://software.hixie.ch/utilities/cgi/pingback-proxy/server-to-get-proxy/http://www.example.net/pingback.cgi">

Pingback clients would then hit the proxy using XML-RPC, which would
translate the request into a GET call as decribed above.


Server Proxy: Get with Referrer
-------------------------------

This proxy implements an XML-RPC to HTTP GET gateway for pingback much
like the one described above. It should be called directly (there is
no special parameter passing as with the server-to-get-proxy script).

   http://software.hixie.ch/utilities/cgi/pingback-proxy/server-to-referrer-proxy

When this proxy is called (with the method name 'pingback.ping' and
the two XML-RPC arguments representing the source and target URIs
respectively), the target URI is fetched, with the "Referer" HTTP
header set to the source URI.

This server can be used by pages which do not have an XML-RPC server
but wish to be pingback-enabled, and already have referrer processing.

   <link rel="pingback" href="http://software.hixie.ch/utilities/cgi/pingback-proxy/server-to-referrer-proxy">

Pingback clients would then hit the proxy using XML-RPC, which would
translate the request into a GET call as decribed above, which would
then appear on the usual referrer logs.


Server Proxy: Mail
------------------

This proxy implements an XML-RPC to e-mail gateway for pingback. It is
called with two special parameters passed as part of the URI to the
script:

   http://software.hixie.ch/utilities/cgi/pingback-proxy/server-to-mail-proxy/from@example.com;to@example.com

The two paramters, separated by a semicolon (;), are used as the From
and To addresses of the e-mail respectively.

When this proxy is called (with the method name 'pingback.ping' and
the two XML-RPC arguments representing the source and target URIs
respectively), an e-mail is sent to the To address containing the
details of the pingback: the source and the target URIs.

This server can be used by pages which do not have an XML-RPC server
but wish to be pingback-enabled through e-mail notifications. For
example, if user blogger@dummy-blog.org wanted to receive e-mail
notifications of pingbacks, with the e-mails set up so that they
appeared to come from admin@dummy-blog.org, he would put the following
<link> element on his blog:

   <link rel="pingback" href="http://software.hixie.ch/utilities/cgi/pingback-proxy/server-to-mail-proxy/admin@dummy-blog.org;blogger@dummy-blog.org">

Pingback clients would then hit the proxy using XML-RPC, which would
translate the request into an e-mail sent to blogger@dummy-blog.org.

This can be very useful as a pingback server to use for an entire site
using an X-Pingback header. The following could be added to a
.htaccess file for this purpose:

   Header add X-Pingback "http://software.hixie.ch/utilities/cgi/pingback-proxy/server-to-mail-proxy/site@example.com;user@example.net"


Trackback To Pingback
---------------------

This is a simple trackback-to-pingback proxy. It accepts POST requests
in the form described by the Trackback specification:

   http://www.movabletype.org/docs/mttrackback.html

...and relays them to a pingback server.

When setting up the trackback link, use the following URI:

   http://software.hixie.ch/utilities/cgi/pingback-proxy/trackback-to-pingback/parameters

...where parameters is a URI escaped string containing:

   uri-of-pingback-server,uri-of-target

...where uri-of-pingback-server is replaced with the absolute URI of
the pingback server, and uri-of-target is the URI of the post being
pinged. (Both need to be URI-escaped, so that the net result is that
they are escaped _twice_. This to work around an Apache bug.)

The title, excerpt and blog_name parameters are ignored. The url
attribute is used as the source.

Return values will be in the trackback response format. Non-error
return data from the pingback server is discarded, since the trackback
format has no way to convey data on success.


Pingback to Trackback
---------------------

This is a simple pingback-to-trackback proxy. It accepts pingback
requests in the form described by the Pingback specification:

   http://www.hixie.ch/specs/pingback/pingback

...and relays them to a trackback server.

When setting up the pingback link, use the following URI:

   http://software.hixie.ch/utilities/cgi/pingback-proxy/pingback-to-trackback/uri-of-trackback-server

...where uri-of-trackback-server is replaced with the absolute URI of
the post's trackback server, as per the trackback spec.

The source is fetched to find the value for the trackback title and
blog_name arguments. Only the <title> is examined, and it is assumed
to be in the form "Blog Name: Post Title" or "Blog Name - Post Title".
If it doesn't match either then the title is taken to be the entire
<title> and the blog_name is left blank. The excerpt parameter is
always left blank. 

The target value is ignored. In particular, it is not used to find the
id, and is not passed on to the trackback server.


Notes
-----

To prevent abuse, the scripts have a one second delay added to each
request. If you wish to download the source for these scripts and use
them yourself, you are welcome to. See the license details within the
source files.

Feel free to e-mail me if you have any questions:
Ian Hickson <ian@hixie.ch>