Google Blogoscoped


Yahoo Term Extraction in PHP5

Aleem B [PersonRank 0]

Sunday, November 2, 2008
15 years ago2,702 views

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);

Forum home


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!