Thursday, May 25, 2006

Poor Man's Trackback

I wanted to send a trackback today, but Blogger doesn't support them (with good reason, details at the end of this post). Fortunately, a trackback is nothing more than an HTTP post with your blog entry's URL to the other blog's trackback URL. A simple curl command does the trick:

  $ curl -d url=[my entry's URL] [trackback URL]

If successful, the command outputs something like this:

  <?xml version="1.0" encoding="utf-8"?>
You can also specify the title, excerpt, and blog_name using additional -d parameters.

I guess you can imagine trackbacks are pretty prone to spamming. For example, unlike comments, I don't see any way you can insert a captcha.

Blogger on the other hand supports backlinks. Instead of allowing/requiring users to manually post reverse links, Blogger asks Google Blog Search for links back to an entry. This way you don't have to build trackback functionality into every blog tool, and you can use Blog Search as a giant spam filter.

Until everyone else catches on, we have curl.


Post a Comment

<< Home