I needed to retrieve some HTML from another site, and feed that into WordPress. Found this little gem -- the PHP Simple HTML DOM Parser by S.C. Chen. It's an HTML DOM parser written in PHP5, which lets you find and modify tags on an HTML page with selectors just like jQuery.
Complete manual here (the link is not too obvious on the homepage).
This is the easiest way I have found, to search and mogrify foreign site's content into something useful. Highly recommended.