Embedding PHP with Smart Pill

It’s always an interesting challenge to take a system you are familiar with and try to use it in an entirely new way or context. That’s what I’ve been getting with PHP of late. As more and more of my web development work moves to Rails, I’ve had the chance to work on PHP embedded within Filemaker Pro as I’ve tested and explored Scodigo’s new Smart Pill plugin. For those of us used to programming in full-fledged languages, writing scripts and functions in filemaker can be quite a challenge. Writing and debugging all that recursive code is a time-consuming process, and communicating with external processes isn’t really worth the work without plugins. Smart Pill changes all that, by opening up the entire PHP (5.1.4, including many extensions) engine for use within Filemaker. ...

August 15, 2006

XML_Feed_Parser Release Candidate

The first release of XML_Feed_Parser in six months is out the door, and it’s the first (and hopefully only) release candidate. I’ve had several people email me with questions about the package in the past few weeks, most of whom are using it successfully and wanted to see a stable release soon, so it seemed time to get moving on that. This release fixes a few small bugs, mostly related to the packaging rather than to its operation, and I’m now bundling the various Relax NG schemas used for validation to save on HTTP requests. There is one open ticket that I’ll need to attend to, and then all should be ready for 1.0. ...

July 27, 2006

PHP and Ma.gnolia

It’s been gratifying to see a few PHP web service libraries emerging based on my Services_Technorati package. It’s particularly enjoyable when the writeup is in a language you don’t read… The latest to appear is a wrapper for the mag.nolia social bookmarking site. You can find it on Alex Sancho’s site. Hopefully he’ll propose it for inclusion in PEAR.

June 6, 2006

Granting and Checking Permissions with LiveUser

I was reminded by maxi_million in the comments on one of my previous LiveUser tutorial entries that I never completed the promised third entry in that series. After the initial procrastination wore off and I initially turned my mind to writing this piece, my main project using LiveUser ended up being converted (for various reasons) into a drupal site, so my further use of the library has been quite minimal. But I do have a little code sitting around, so will try and draw together a few notes on how I was using Liveuser. ...

February 16, 2006

Feed Parser: First Beta

I promised more work on XML_Feed_Parser this month and am pleased to say I found the time. The first beta, version 0.3, is on its way into PEAR. Two key developments in this version are support for the ‘content’ module in RSS2 and fix of a serious bug in the main __call method. I was accessing the compatMap variable (that handles the mapping of element names between different syndication formats) directly, and calling array_pop on it. That threw up problems if you wanted to access the same element multiple times, so I’ve added in a temporary variable to fix that. ...

January 11, 2006

XML_Feed_Parser 0.2.8

Paying projects have kept me away from XML_Feed_Parser for the past couple of months, but today finally brought time to get a new release into shape. The main focus has been on working through the tests that come with The Universal Feed Parser. I have a (rudimentary) script that converts those tests into PHP and makes some syntax conversion to bring them into line with my package. There’s still some hand tweaking required to get the tests running properly, but for the time being that seems preferable to writing a full lexer. ...

December 26, 2005

SimplyGiven

This week saw the launch of the project that’s been occupying more of my time of late than any other. SimplyGiven is a new venture on the part of local firm General Motivational, who specialise in customised products, often for corporate reward schemes, and marks their entry into the consumer market. The site is all developed using PHP5.1 and is my first project to launch using MySQL5. At present it doesn’t make much use of the new features that came with MySQL5, but there’s a good chance that the next revision will. Behind the scenes it’s linked in with a FileMaker Pro database that allows for a sophisticated interface for the staff maintaining the catalogue. The FileMaker database was developed, and the project managed, by Micah Woods of Woods IT. ...

December 16, 2005

Feed Parser: Universal Feed Parser Tests

Inspired by Sam Ruby’s work on applying the Universal Feed Parser tests to the Ruby FeedTools, I’ve spent a little time this afternoon working on testing XML_Feed_Parser with that same test suite. There’s a lot of work to do! UFP’s tests consist of a series of feed files, some well-formed, and some illformed, with a description and test condition defined at the top of the file. eg. Example description So far all I’ve done is run a script through all the tests for well-formed feeds, testing whether XML_Feed_Parser throws an exception when I try and interpret them. When run against the current CVS, 1181 of the 1273 feeds parsed successfully and 92 failed. 68 of those failures were due to encoding problems (which I’ll try and work around, but won’t be able to cleanly fix until PHP has full unicode support), and another 17 were a result of not supporting CDF, leaving another seven I need to get fixed asap. ...

November 6, 2005

New Feed Parser version

There’s a new version (0.2.5alpha) of XML_Feed_Parser in the wild. I’ve cleaned up the handling of xml:base considerably, finally switching over to using PHP DOM’s baseURI attribute and checking the bases for all links returned, whether from link constructs or in text constructs with the type ‘xhtml’. That coincides with reworking the getText() and getContent() methods for atom so they now properly recognise the different types that the atom spec allows. There’s a little more work to do to properly allow non text/html mime types in atom:content, since I don’t want to return less common mime types without a way for the user to check the type beforehand. That should come in the next version. ...

October 15, 2005

XML_Feed_Parser CFV

Last night I initiated the Call For Votes on XML_Feed_Parser’s inclusion in PEAR. The package isn’t quite where I want it to be, but after several months’ work, the core functionality is all in place and the first round of unit tests are all passed successfully. So if you’re a PEAR developer… please go and vote! (feedback is still welcome from those who aren’t)

October 3, 2005