Sunday, May 4, 2008

Pingback

Pingback

The Pingback system is a way for a blog to be automatically notified when other blogs link to it. It is entirely transparent to the blogger doing the linking, requiring no user intervention to work, and operates on principles of automatic discovery of everything that it needs to know.
A sample blog post involving Pingback might go like this:
  1. Alice posts to her blog. The post she's made includes a link to a post on Bob's blog.
  2. Alice's blogging system contacts Bob's blogging system and says, "look, Alice made a post which linked to one of your posts!"
  3. Bob's blogging system then, when people view the posts on Bob's blog, notes on the page that Alice linked to this post.
  4. Users can then follow this link back to Alice's post and read more.
It enables reverse linking -- a way of going back up a chain of links rather than merely drilling down.

How it works: a technical description

If you just want to use Pingback then you don't need this part. This is for people who write blogging systems and want to implement Pingback in theirs.
Pingback is based around the poster's blog sending an XML-RPC "ping" to the blog it's linking to, telling it what was linked to and where the link comes from.
A sample blog post involving Pingback, in technical detail, might go like this:

The posting blog's part

  1. Alice posts to her blog. The post she's made includes a link to a post on Bob's blog. (We'll refer to the permalink for Alice's blog post as aliceBlogPostPermalink, and to the URL of the link to Bob's blog as bobBlogPostPermalink.)
  2. Alice's blogging system parses all the external links out of Alice's post.
  3. For each external link, do the following:
    1. Request the content of the page referred to by the link. (Note: you may want to control this request, specifically its size, since you may not want to download all of the content of the page if that content is very large, as this would effectively be a denial-of-service on the blogging system.)
    2. Parse the page for the Pingback LINK tag:

      If this tag is not contained in the page, then Bob's blog does not support Pingback, so give up here.
    3. If the tag is contained in the page, then the href attribute indicates the location of the Pingback XML-RPC server that should be pinged to notify Bob's blog entry that it is being linked to. Execute an XML-RPC call to function pingback.ping(aliceBlogPostPermalink,bobBlogPostPermalink) on that server.

The linked-to blog's part

  1. Bob's blog receives a ping from Alice's blog (the ping sent in step 3.3 above), naming aliceBlogPostPermalink (the site linking to it) and bobBlogPostPermalink (the page Alice linked to).
  2. Confirm that bobBlogPostPermalink is in fact a post on this blog.
  3. Request the content of aliceBlogPostPermalink (Note: again, you may want to control this request to prevent denial-of-service, and possibly also check the content-type of the content as returned by the server.)
  4. Verify that this content does indeed contain a link to bobBlogPostPermalink (to prevent spamming of pingbacks).
  5. Retrieve any other data required from the content of aliceBlogPostPermalink (this might include the page title, an extract of the page content surrounding the link to bobBlogPostPermalink, any attributes indicating which language the page is in, and so forth).
  6. Record the pingback. (Depending on the blogging system, this might include storing the details in a database, and/or rebuilding static pages referring to the pingback).



Add to Technorati Favorites
Internet Lifestyle

Enter your email address:

Delivered by FeedBurner



Subscribe to "Internet Lifestyle"






0 comments: