Monthly Archive for May, 2005

Flickr Colour Picker

This rules, this just totally totally rules.

Drowning in Numbers

I was doing a Google image search for Drowning by Numbers when I found this.

A nice idea, and something I’d thought of doing but not got round to. This is lovely and French, though. The 35, 45 and 90 are just simple stencilling, but so beautiful.

The rest of the site is worth a gander also. Some rather artful polaroids and a nice trip round the streets of Marseille in the footsteps of a tagger named Love.

Simple PHP text file editor

I was looking around for some VERY simple PHP code that would allow me to edit a text file on a web server.

I came across this code, but for the life of me couldn’t get it to work. It would read the contents of the text file but never modify it.

I don’t know if it’s a PHP dialect issue, but I’ve now got it working on Apache on Mac OS 10.3 with the following tweaks:

if ($submit)
at the top of the original is now
if (($_POST['submit']) == “submit”)
This detects if the form has been submitted; if it has, it then goes on to rewrite the text file.

fwrite($fp, stripslashes($newdata));
is now
fwrite($fp, stripslashes($_POST['newdata']));

Maybe I’m missing something, but it seems logical that a form returns an array, and in order to process the form you need to access the individual elements of the array. Just writing ‘$newdata’ (rather than telling PHP it’s the ‘newdata’ bit of the submitted form) seems too simple!

Anyway, here’s my code. You’ll need a text file in the same directory called data.txt and you’ll need to change its permissions I suppose. I really must read up on Unix permissions and PHP next…

<?php

if (($_POST['submit']) == “submit”) {
$fp = fopen(”data.txt”,”w”);
fwrite($fp, stripslashes($_POST['newdata']));
fclose($fp);
}

// was stripslashes($newdata);

$fp = fopen(”data.txt”,”r”);
while (!feof($fp)) {
$data .= fgets($fp, 4096);
}
fclose($fp);

?>

<html>
<head>
<title>php form test</title>
</head>

<body>

<p>Adapted from http://www.onaje.com/php/article.php4/23
by othermachines.org

<p>The contents of a text file called data.txt is displayed in
the edit window below and you can edit it and save it by
clicking on the Submit button.

<form action=”<? print $PHP_SELF; ?>” method=”post”>
<textarea name=”newdata” rows=”10″ cols=”40″>
<?
print $data;
?>
</textarea>

<input type=”submit” name=”submit” value=”submit”>
</form>

</body>
</html>

Purrfect USB hub

I’m tempted, very tempted by this:

This USB Hello Kitty hub responds to your typing, by talking and moving. Works in English or Japanese. PC or Mac. A snip at $80.

How to punish consumers for not stealing intellectual property

I’m usually very happy to pay �10-15 or so for a DVD, especially if it’s one of the finer products of the good people at Pixar or Lucasfilm.

But I really hate having to sit through adverts (or skip through them) to get to the main feature, especially when a 2 year old is screaming he wants to watch Toy Story and he wants to watch it NOW, while the phone is ringing and the pan boiling over… Disney are especially bad at piling on the trailers which you cannot bypass by pressing ‘menu’.

But the Star Wars Clone Wars animated feature DVD has hit a new low.

You first get a short film about the evils of DVD piracy.

You then get a selection of text slides about the evils of DVD piracy, and in case you try to skip them YOU HAVE TO SIT THROUGH THEM ALL OVER AGAIN.

Oh and how we love the Australian copyright message. And the Norwegian one.

The irony of this is that if I got a pirated version of this DVD, all that crap would have been cut out and I, the shmuck who pays for legit DVDs get the lecture, and the people who buy dodgy copies from car boot sales get to go straight to the feature…

Drowning by Numbers

Peter Greenaway went a bit mad (okay, a bit madder) after The Cook, The Thief… and I stopped liking his stuff.

Still odd, though, that Drowning by Numbers doesn’t seem to be out on DVD yet. I dusted off my VHS copy. Ahhh, “sheep are much maligned”, “the best days for violent deaths are Wednesdays” and now how about some wallpaper…

Drowning by Numbers Joely Richardson wallpaper

Download 800 x 600
Download 1024 x 768

VHS 1, PVR 0

I’ve been looking for an excuse to buy a Personal Video Recorder (PVR) for a while now. They just seem like such a neat idea. A DVB/Freeview receiver picks up a free digital TV signal, records the stream of data onto an 80GB hard disk allowing perfect playback and easy recording of about 40 hours of TV. Who needs VHS?

Today I was granted my wish. My wife wanted tonight’s ER taping and our rather nice Panasonic VHS machine - an extravagantly generous wedding present from my brother - is now useless as a recorder. It plays back just fine but the audio is intermittant on recordings.

This really was the perfect excuse. I could keep the VHS machine so the kids can watch the few videos they have and get the PVR I’ve craved for so long.

So I rushed down to Comet and looked at what was on offer. A Humax DVB PVR for �179. I was tempted, so tempted. The Humax is a very shiny gizmo. I like shiny gizmos. And hey, it even records radio programmes, so I need never miss Marc Riley or Andrew Collins on 6 Music.

I paced round the store several times, thinking. I looked at the DVD recorders. Some of them had 80GB hard disk drives in, too. But none of them had a digital tuner.

What would be really good would be a DVD recorder with a hard disk and a Freeview DVB tuner. That I’d pay �179 for.

Finally I came to my senses and thought about how much we actually record. On average it’s far less than 1 hour a week. It’s ER when my wife’s too sleepy to watch it, it’s Conviction on BBC2 when I’m working and The West Wing when the &*$@ers at Channel 4 show it at 7pm or 3am.

So I went to my local Sainsbury’s and bought a Philips NICAM VHS recorder for �45.

Job done.

May’s OtherMachines cover art wallpaper

Here’s May’s OtherMachines cover art for download as wallpaper / desktop pictures - two sizes of GIF. Designed on the FrankeniMac with my cruddy old Elonex VGA monitor…

download 800×600 pixels |
download 1024×768 pixels

Representation of the Pee-pil

I’ve never been much of a fan of Proportional Representation. I’ve always assumed it leads to weak coalition governments.

But I’m starting to think that it might be a good idea. The election we’ve just had was decided by a million or so voters in marginal constituencies. I live in a very safe Labour seat. No-one knocked on my door, no-one campaigned here so as you’d notice. No-one even sat outside my polling station asking to see my polling card - as they did when one seat was up for grabs in a local council by-election.

If we had PR, every vote would count and maybe some candidates would have knocked on my door and asked me what I thought.