journal

Blogging elsewhere

Capsi

Although I will keep this blog around, I haven't yet decided what to do with. I have been will be primarily using my Capsi journal. Update your links, bookmarks, RSS feed readers and continue reading at Capsi!

Technorati pings

Software

Unless I messed up my code, this journal should be sending Technorati pings again. I'm still getting reasonable traffic from the site for older entries so it should be worth it to get listed there again.

(On that topic, I'm considering to return to a more distributed blogging effort, with different blogs for different areas of interest, in order to build more dedicated audiences for each topic. The new profile/music site already is a step towards such a setup, after all.)

Anyway, here's the PHP code that (should) send a proper ping to Technorati:

class Ping
{
function httpPost( $host, $port, $uri, $data, $userAgent = "KikiCMS/0.99" )
{
$url = "http://${host}:${port}${uri}";

$fp = @fsockopen( $host, $port, $errno, $errstr, 5);
if (!$fp)
return false;

$out = "POST ${uri} HTTP/1.1\r\n";
$out .= "Host: ${host}\r\n";
$out .= "Content-Type: text/xml\r\n";
$out .= "Content-Length: ". strlen($data). "\r\n";

fwrite($fp, $out);
fwrite($fp, "\r\n");
fwrite($fp, $data);
fwrite($fp, "\r\n");
fpassthru($fp);

fclose($fp);
return true;
}

function technoRati( $title, $url )
{
$uTitle = htmlspecialchars($title);
$uUrl = htmlspecialchars($url);
$xml = "<?xml version=\"1.0\"?>\n"
$xml .= "<methodCall>\n";
$xml .= "<methodName>weblogUpdates.ping</methodName>\n";
$xml .= "<params>\n";
$xml .= "<param>\n<value>$uTitle</value>\n</param>\n";
$xml .= "<param>\n<value>$uUrl</value>\n</param>\n";
$xml .= "</params>\n";
$xml .= "</methodCall>\n";

Ping::httpPost( "rpc.technorati.com", 80, "/rpc/ping", $xml );
}

Include the class when you save (insert) an entry with Ping::technoRati( "My blog", "myurl" ) and you should be ready to go.

New journal categories

Software

I've added a few new journal categories and have re-categorised existing entries in order to match them. The new topics are:

Enjoy!

Obligatory first entry

Personal

This is already my third first journal entry if you count previous attempts on my old "Blog of Rob" and the short-lived LiveJournal I maintained. Or maybe fourth, if you include my Simply American contributions. Sixth if you count the news engines of some of my software projects as well.

But this journal will be slightly different from all its predecessors: all interests of mine that I care to write about can now be found at a single location. It didn't make much sense to continue a thorough separation because of all my writings are based on a single frame of reference anyway.

A significant improvement of this journal in comparison with all previous ones: it is no longer necessary to register a user account to post comments as I have hacked together the seemingly popular method of letting users enter a code displayed in a generated image.

Update: I have imported my old LiveJournal posts of 2005 and will eventually import "Blog of Rob" entries of 2003 and 2004, so technically this is no longer the first post.

© Copyright 1995-2008 Robert John Kaper. All rights reserved.

Tom has more friends but mine are prettier! (#1/1)