All Posts Tagged With: "php"

PHP SOAP vs. SDO

In my role as eBay Platform Evangelist, I spend a lot of time exploring different XML technologies.

SOAP is obviously the big one. I use the PHP 5 ext/soap extension, which is great, but there’s actually another PHP SOAP extension that might be even better. No, it’s not PEAR::SOAP or NuSOAP; it’s axis2.

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!

Stupid PHP one liners: Google calc

A long time ago, I wrote a two line hack that let you use Google as a command line calculator. It eventually ended up in the 2nd and 3rd editions of Google Hacks.

I don’t know what caused by to look at that code again, but here’s the one line version:

print str_replace('<font size=-2> </font>', ',' ,
  preg_replace('(.+<b>.+= (.+?)</b>.+)s', '$1',
    file_get_contents('http://www.google.com/search?q=' .
      urlencode(join(' ', array_splice($argv, 1)))))) . "\n";

My favorite new style of printf

I just discovered vsprintf(), which accepts a formatting string and an array of arguments:


// logging function that accepts printf-style formatting
// it prints a time stamp, the string, and a new line
function logf() {
	$date = date(DATE_RSS);
	$args = func_get_args();
	$format = array_shift($args);

	return print "$date: " . vsprintf($format, $args) . "\n";
}

Just sharing.

eBay Developers Conference 2006

With less than a month to go, this year’s eBay Developers Conference is really beginning to gel. I’ve been working with a number of people all across eBay to put together a great show. So far, we’ve got:

  • Tracks on eBay, PayPal, Skype, Shopping.com, and ProStores Web services and APIs
  • Sessions on, for lack of a better phrase, “Web 2.0” content, including AJAX, widgets, XUL, mashups, and Chris Anderson presenting on “the long tail.”
  • Keynote talks by Pierre Omidyar & Scott Cook, the head of eBay corporate strategy, and the head of eBay corporate architecture.
  • Business talks and panels by Digg founder Kevin Rose, SocialText founder Ross Mayfield, SixApart’s Anil Dash, SoftTech Venture Consulting’s Jeff Clavier, and others.
  • A half day unconference, where you can get together to share your knowledge on the topics that matter to you. (Check out our Conference Wiki to start participating before the show begins.)
  • An opening kick off party at the House of Blues, a beer bash the next night, and general Vegas fun and glamour. (Did I mention the show is in Las Vegas at the Mandalay Bay Hotel and Casino?)

eBay Express is Live

We’ve finally rolled out eBay Express, our new fixed-price shopping site. In fine Web 2.0 fashion, it’s a beta (well, technically, it’s a preview). However, I’ve been playing with an internal release for a few weeks now and it’s already in quite fine shape.

Heading to Germany for eBay Live! Germany and Entwicklertag

I’m heading to Dusseldorf, Germany for eBay Developer Day (Entwicklertag) and eBay Live! Germany. If it’s anything like eBay Live! US, it should be a blast.

My talk is on “Software innovations from the US,” which (fortunately for me) appears to be in English. All the other talks are in German. :) I’m looking forward to seeing my friends at eBay Germany again and meeting a number of new German eBay developers.

Right now, I’m scheduled to work May 26-28, but I will either arrive a few days early or stay a few days late. What should I do? It’s my first time in Germany, so I’m open to anything. I’m trying to stay somewhere near the Dusseldorn / Frankfurt area, so I don’t spend all my time travelling, but I’m open to anything.

Also, if you can’t make it to Dusseldorf, I’m able and willing to talk to any Germany user groups about eBay Web services (or PHP). Let me know if you’re interested in setting up a user group meeting, or you just want to hang out.