Posts Tagged ‘PHP’

Enumerating note data in Flickr using PHP

Friday, September 24th, 2010

Flickr provides a comprehensive API to access its data. It also has a very neat notes facility that allows you to add notes to a region of an image which pop-up when you mouse over the relevant area. Flickr provides API calls to add, edit and delete notes but not to enumerate notes associated with an image. To do that you have to do a little more work.

(more…)

Capturing still images from video devices in PHP using Framegrab

Sunday, February 28th, 2010

I found I had a need to capture and process still video images from video devices using PHP so I wrote the Framegrab PECL extension. This post introduces the basics of Framegrab.
(more…)

Serial IO in PHP using the DIO extension

Monday, February 15th, 2010

DIO is the Direct IO extension for PHP. I recently took over maintaining this extension and have implemented comprehensive stream support for both POSIX and Windows systems. To demonstrate the use of DIO this post will describe a PHP script that sends an SMS using a USB 3G modem.
(more…)

PHP DIO Extension: Looking for beta testers

Tuesday, February 2nd, 2010

A few months ago I had a need to do some serial IO from PHP. After asking around I found out there was a PHP extension for this but it was unmaintained, unowned and out of date. To cut a long story short I ended up as the maintainer of said extension and since them I have been fixing and extending it.

The original DIO API is very basic and POSIX oriented. Serial support is not very configurable and doesn’t work at all on Window platforms. So I have been working on implementing PHP stream extensions that allow you to do raw and serial IO via streams. Anyway its ready for testing by people other than me on POSIX (Linux, OS X etc) and Windows platforms so I’m looking for beta testers.

(more…)

Popping my conference cherry (Part #1)

Friday, March 6th, 2009

Friday 27 February was PHP UK Conference 2009. I’m doing more and more PHP and other web oriented coding as a change from my day to day work which is debugging low level linux code. A conference seemed the best way to find out more about the language and technologies so, with some encouragement from friends, I decided to go. I used some Hilton Honors points to get a couple of nights at the Hilton Euston in London and drove down there on the Thursday.

Usually I catch the train to London but as I was heading to Bristol from London on the Saturday I drove. Also normally when I drive I leave the car in outer London and catch the tube but a combination of lack of time and Barnet Council making all street parking short term meters or residents only I found it was easier to drive all the way in and leave the car in some free over night parking by the hotel. This worked well the first night because I entered the area after the end of congestion charging.

The Social

The PHP WomenThursday night was the social at The Brook Green Hotel on Shepherd’s Bush Road near to Olympia, which is where the conference was held. After a quick check in I changed and caught the tube to the Hotel. At the hotel I met up with my roomie for the two days, Kat, Lornajane, Derick and Sara. I also met a load of new people and put faces to the PHP Women I knew from online. I also drank rather a lot of vodka!

Sara poses for the cameraThe social was organised by PHP London as a special one of their usual nights held at the hotel. There were two talks made during the evening. Derick made the first one on using DBUS with PHP. It was interesting . By the time of Sara’s talk I was both tired and quite drunk so I’m afraid I wasn’t paying attention. Although I did get an awesome photo of her.

A round midnight Kat and I started to wend our way back to the hotel. Once we got there Kat had a few transfers to apply to t-shirts for the “Booth Babes”. Then we set the alarm for 6.30 am and went to sleep.

The Conference

The morning started far too early with the alarm going off at 6.30 am but after waking up I was quite excited as this was my first ever conference of this kind. I’ve attended shows and expos before and even given talks in front of lots of people but never attended a ‘proper’ conference. Since I had to find parking for the car it seemed easiest to drive across town and leave it in the horendously expensive Olympia car park. Like Thursday night I was driving against the traffic and so it was a pain free trip.

Chatting between talksKat and I arrived at the Conference Centre around 8.30 am. We registered, grabbed tea and coffee and helped set up the PHP Women’s stand. The key note was due to start at 9.30 but due to registration issues it didn’t start until 9.45. This meant we could natter longer between ourselves.

The future’s so bright, I gotta wear shades

Aral Balkan gave the key note speech and what a speech to be introduced to conferences with. Aral is a flash developer. Quite trendy he is a sociable guy and we talked both at the social and at the after conference party. His talk was not just relevant to PHP developers or even Web 2.0 developers but all developers of any software that has an end user. And he’s absolutely right. What is the point of having the most perfectly architected piece of software which follows more computer science patterns that you can shake a stick at if you completely miss the boat, which in most cases is the market. Sometimes you do just have to code and refactor later. He talked about commodity hardware and commodity software, great new tools and technologies, and was totally inspiring. An excellent way to start the day.

What’s new in PHP 5.3

The talk on the new features of the PHP language by Scott MacVicar was, in some respects, the complete opposite of Aral’s talk. It was totally technically and just described each of the new features in PHP 5.3, just as it said on the tin. For someone still learning this was extremely useful.

Of lambda functions, closures and traits

The final talk of the morning I attended was another technical one which explained some of the upcoming facilities in PHP 5.4. It described how to define lambda functions and closured (quick throw away functions useful as callbacks and so on). And the upcoming traits mechanism that introduces a level of multiple inheritance to PHP classes whilst avoiding the diamond pattern issue and duplicating Java’s interface mechanism.

Then it was lunch.

(cont)