Google Blogoscoped

Forum

Yahoo Term Extraction in PHP5

Aleem B [PersonRank 0]

Sunday, November 2, 2008
3 years ago1,045 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);

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home

Advertisement

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

 

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