A minor victory
I think I’ve found the solution to my first problem with my RDF project, how to identify people when they post with one name, and comment with another couple of names, possibly using more than one email address and homepage URL as well: Friend Of A Friend, or FOAF, is an RDF vocabulary for describing things about a person, like their name, nicknames, homepages, and email addresses. Ideal.
You can easily create your own FOAF file with Leigh Dodds’ FOAF-a-matic, a Javascript application that lets you fill in a form and generates the RDF for you. Since FOAF is just using email addresses as an identifier, on the assumption that a given address has only one owner (there may be several people named Phil, but only one has the email address philringnalda at barrysworld.com), the spec allows <foaf:mbox_sha1sum>, the SHA-1 hash of the address, in place of <foaf:mbox>. An SHA-1 hash is just a way of converting a text string to a 160 bit digest, generally displayed in hex. The SHA-1 hash of mailto:philringnalda at barrysworld.com is 910a4f5ef7f0e062ae1fcab1ca981d14ef40563e, and so if I put that in a <foaf:mbox_sha1sum> element in my FOAF file, then I can compute the SHA-1 hash of every email address I run across in RDF from RSS files, and when I find a match I can at least suspect that I’ve found something I posted. I don’t have to put the address in plain text in my FOAF file where any passing spambot can harvest it, and I don’t have to worry about abuse of the addresses I’m storing in my RDF database either.
All fine and dandy, until I try to compute a SHA-1 hash in PHP. PHP supports SHA-1 in the mhash extension, which isn’t a part of the standard PHP distribution, and isn’t in my host’s version of PHP. Fine, I’ll just run the shell command sha1 -s “string” and get it that way, since PHP has several ways to run shell commands. None of which my host allows. As a desperate last resort, until I come up with something better, I marshalled all my Perl skills (read: I copied stuff from various other scripts) and wrote sha1.cgi, which, when you pass it s=string, returns the SHA-1 hash of string. Then I use fopen/fread in PHP to get sha1.cgi?s=mailto:address, and I’m in business. Sometimes I wonder if I wouldn’t be better off just learning Perl.
TypeKey is live (beta)
I ran into a site that is running MovableType 3.0 (beta1) with TypeKey support. There is no public protocol doc yet (afaik), but here’s a quick analysis….