Out playing the role of UMTS nomad again, this time hanging off a different gadget.
While taking respite from the sun (it's moderately cooler, but it still stings), took the time to post a couple more restaurant descriptions over at Bruno's site - I've recently switched to a Moleskine as "PDA", and it shows - my notes are more fluid, and writing with a pen (or, in my case, with a pencil) makes for better overall recollection of what I did, ate or said.
(As in all forms of GTD, anything that forces more of your brain's wiring to work together leads to better overall results. Paper isn't successful just because it lasts longer, it's also because it works better with our visual and muscle memory.)
Somewhat puzzled at the lack of Technorati updates (my site is listed as having been updated 62 days ago), I decided to code a quick and dirty Technorati pinger for PhpWiki using the PHP CURL functions:
function ping_technorati($site_name, $site_url) {
$request = "<?xml version=\"1.0\"?><methodCall><methodName>weblogUpdates.ping</methodName>" .
"<params><param><value>$site_name</value></param>" .
"<param><value>$site_url</value></param></params></methodCall>";
$host = "rpc.technorati.com";
$url = "/rpc/ping";
$port = 80;
$url = "http://$host:$port$url";
$header[] = "Host: rpc.technorati.com";
$header[] = "Content-type: text/xml";
$header[] = "Content-length: ".strlen($request);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
$data = curl_exec($ch);
if (curl_errno($ch)) {
print curl_error($ch);
} else {
curl_close($ch);
print "Pinged Technorati";
}
return $data;
}
We'll see how it goes. If you want to do the same to your PhpWiki install, this should be called in editpage.php like so:
function editPage () {
$saveFailed = false;
$tokens = array();
if ($this->canEdit()) {
if ($this->isInitialEdit())
return $this->viewSource();
$tokens['PAGE_LOCKED_MESSAGE'] = $this->getLockedMessage();
}
elseif ($this->editaction == 'save') {
if ($this->savePage()) {
ping_technorati(WIKI_NAME, FULL_SITE_URL);
return true; // Page saved.
}
$saveFailed = true;
}
...
...where WIKI_NAME is the standard PhpWiki constant and FULL_SITE_URL a kludge I had to code in to deal with referrer spam. With this, every Wiki update will send an XML-RPC "ping" to Technorati (something you might want to avoid if you are still foolish enough to run an open Wiki).
New photos will be up soon (won't open the camera until we run out of sunlight, but I expect at least a couple of intriguing shots).
In the meantime, if you haven't been keeping up with the CSS Zen Garden, take a look at this style. Amazing.