Considering how regularly new versions of Firefox now come along, that's quite some bug fix list in version 10! http://t.co/K3I2vLpW 1 week ago

6th
Oct 08

Reading Picasa captions in PHP



Ok, it’s going to get technical.

Although I’ve recently bought Photoshop Elements, Picasa used to be my photo browser of choice (in fact it still is as I get used to Photoshop). Therefore when I wanted an easier way to add photos to the BMTG website, I developed it with Picasa in mind.

Apart from the site generating its own thumbnails, it also gets its description from the embedded Picasa data. I found out the data after reading on the PHP site about looking at EXIF and other image data and writing a program to display it all – this revealed the Picasa caption field.

However, it did seem to have an anomaly in that it ended with a null character. I therefore coded around this. Unfortunately1 with Picasa 3, this appears to have been fixed and so recently described photos are being truncated on my site. It’s not too much of a hassle, though, to detect for this. The code I use is as follows…

list($width, $height) = getimagesize($full_filename, $info);
$iptc = iptcparse($info["APP13"]);
$description = $iptc["2#120"][0];
if (ord(substr($description,-1))==0) {
   $description=substr($description,0,-1);
}

Simply populate $full_filename with, well, the filename of the image. At the end of it all the Picasa caption will be in $description and the image width and height in $width and $height.

The last line of the code is where I’m working around the null character at the end of the caption (or not).

  1. depending how you look at it []

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly



6th
Oct 08

Speed up your broadband


There are lots of useful hints and tips around – often relating to fiddling around with your MTU, for instance – few of which I’ve found give any benefit. However, here’s one that even gets the backing of BT.

It would appear that in many people’s master BT socket (the one that all your other extension cables and phones are plugged into) there is a wire still in use that, well, isn’t really needed – the bell wire. And it can often cause interference resulting in slower internet connections.

The DIY answer is to open up this socket and remove the wire. The safer option for those who are terrified of pulling on a limp cable that’s barely held in place by anything, is to buy the iPlate from BT. Yes, BT have created a replacement front for your master box that essentially does this for you. And for less than £6 (inc P&P). Seriously, try the DIY option1.

Zen Internet, my ISP, have been quotes as saying…

In a small scale trial we performed… the results [were] varied from no increase up to 1Mb/sec

You may not see immediate improvements because BT automatically limits the speed of your line to match your sync speed to improve connection stability. This is known as your BRAS profile2 and it can take up to three days for BTs automated equipment to adjust this profile.

Personally, I was disappointed – not by the results but the fact that the wire was already missing from mine when I checked, so I have nothing to try. Drat.

  1. instructions kindly supplied by Draytek, a manufacturer of broadband modems []
  2. Zen Internet have an excellent support site for customers where you can check your current BRAS profile []

Delicious Digg Facebook LinkedIn Read It Later reddit StumbleUpon Twitter SeparatorEmail Google Translate PDF Online Print Friendly