Archive for September, 2006

PHP Trivia Contest: DOM + Default Namespaces

Here’s a question based on a recent PHP bug report which shows why DOM is fun.

Given the following line of PHP:

$xml = DOMDocument::loadXML(
'<r xmlns="urn:a"/>');

The easy way to print the namespace URI of the root node, urn:a, is:

echo $xml->documentElement->namespaceURI;

But how do you retrieve it using DOMElement::GetAttributeNS()? What are the two magical input parameters to coax that value out?

PHP 5 + COM + Skype Help Wanted

This is a help wanted ad. Any assistance would be much appreciated.

I’m trying to use PHP 5.2 to talk to Skype via the COM extension and Skype4COM interface.

I’m using this example from the Skype Forum, but I get a COM exception of “Skype client is not installed.”

However, I do have Skype on my machine and I’m not the only one with this problem, so I don’t think I’m completely crazy.

Unfortunately, I don’t normally develop on Windows or Skype, so it’s very hard for me to debug the COM extension. If anyone has some pointers on where I should start, it would be very useful. Thanks!

eBay Category of the Week: Tokens: Transit

I just found out we have a category called “Exonumia.” That was news to me, as I didn’t even know there was a word called exonumia.

You probably use exonumia on a regular basis, without even knowing. What is it? To quote Wikipedia:

Items such as bus tokens (transportation tokens), bar or pub tokens, and casino tokens or chips are some of the more common forms of exonumia.

We have a number of Exonumia subcategories. I think my favorite is “Transit Tokens”.

But “So-Called Dollars” is not a bad one, either.

I love eBay.

Fall 2006 PHP Speaking Calendar

I have a number of PHP related speaking gigs coming up: