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:
- Alice posts to her blog. The post she's made includes a link to a post on Bob's blog.
- Alice's blogging system contacts Bob's blogging system and says, "look, Alice made a post which linked to one of your posts!"
- Bob's blogging system then, when people view the posts on Bob's blog, notes on the page that Alice linked to this post.
- Users can then follow this link back to Alice's post and read more.
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
- 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.)
- Alice's blogging system parses all the external links out of Alice's post.
- For each external link, do the following:
- 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.)
- 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. - 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 functionpingback.ping(aliceBlogPostPermalink,bobBlogPostPermalink)
on that server.
The linked-to blog's part
- 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).
- Confirm that bobBlogPostPermalink is in fact a post on this blog.
- 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.)
- Verify that this content does indeed contain a link to bobBlogPostPermalink (to prevent spamming of pingbacks).
- 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).
- 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).
Internet Lifestyle
Subscribe to "Internet Lifestyle"
0 comments:
Post a Comment