The code has a minor issue. The post should be updated (especially since it's the second search result for: yahoo term extraction php).
The two lines which replace the attributes from the ResultSet tag didn't match the XML I got from Yahoo (it read yahoo:cate instead of yahoo:search). A more robust approach is to replace those two lines with:
$xml = preg_replace("'<ResultSet[^>]+>'isx", '<ResultSet>', $xml);
|