I'm writing a script that takes a webpage and detects how many times stuff like a facebook like button is used. Since this would best be done with a DOM, I decided to use PHP's DOMDocument.
The one problem I have come across, though, is for elements like facebook's like button:
<fb:like send="true" width="450" show_faces="true"></fb:like>
Since this element technically has a namespace of "fb", DOMDocument throws a warning saying this namespace prefix is not defined. It then proceeds to strip off the prefix, so when I get to said element, its tag is no longer fb:like, but instead, like.
Is there any way to "pre-register" a namespace? Any suggestions?