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.

Posted in Uncategorized | Leave a comment

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>

Posted in Uncategorized | Leave a comment

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.

Posted in Uncategorized | Leave a comment

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…

Posted in Uncategorized | Leave a comment

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.

Posted in Uncategorized | Leave a comment