If I had to guess, I’d say it was a result of you using a different version of PHP. I am using PHP5, specifically 5.2.3 I think. I had some problems with the code Zach original sent me and those problems seem to have been a result of a different version between him and me as well.
According to PHP.net, the constructor for DOMDocument has two arguments but they are both optional.
I don’t know how to get at the version of the document for PHP4 to see what the constructor expects there, if you are unable to upgrade. You might simply try adding a version string, “1.0”, as the first argument and an encoding, “utf-8” or “iso-8859-1”, and see if that fixes it. Or upgrade to PHP5 if you can.