I get a page using file_get_contents from a remote server, but I want to filter that page and get a DIV from it that has class \"text\" using PHP. I started with
file_get_contents
Personally, I like Simple HTML Dom Parser.
include "lib.simple_html_dom.php" $html = file_get_html('http://scrapeyoursite.com'); $html->find('div.text')->plaintext;
Pretty simple, huh? It accommodates selectors like jQuery :)