Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (27 sloc) 1.68 KB
layout: post
title: Automated Technorati ping
date: 2007-09-27 22:19:11
updated: 2008-05-20 12:04:59
<div class="narrow-col">
<p><a href="" class="ext">Technorati</a>, a search engine for searching blogs, allows any blog owner to &lsquo;ping&rsquo; his/her blog. In this way Technorati can index your blog based on the tags you assigned to your post.</p>
<p>You can do this manually by requesting a ping with the &lsquo;<a href="" title="Ping form to check when you pinged Technorati" class="ext">Technorati ping form</a>&rsquo; but let's have a look how we can automate this, shall we? Turns out it's really easy to do so even though it's hard to find some documentation about this on Google.</p>
<li>First we'll need Ruby on Rails built in XMLRPC protocol and create a new client that listens to the Technorati web service.</li>
<li>Next we call the service method and pass the name and URL of our blog. We'll keep returned result in the result parameter.</li>
<li>Now we only need to check if the request succeeded by looking at the result parameter and we are done.</li>
{% highlight ruby %}
require 'xmlrpc/client'
server ='', '/rpc/ping')
result ='', 'YOUR BLOG NAME', 'YOUR BLOG URL')
if result['flerror']
flash[:error] = result['message']
{% endhighlight %}
<li><a href="" title="XMLRPC for Ruby, Standard Library Documentation" class="ext">XMLRPC for Ruby, Standard Library Documentation</a></li>