$url = 'http://www.climatempo.com.br/previsao-do-tempo/cidade/401/assis-sp'; // Create DOM from URL $html = file_get_html($url); // Match all 'A' tags that have the class attribute equal with 'l' foreach($html->find('div[id=prob_dados]') as $key => $info) { echo ($key + 1).'. '.$info->plaintext."
\n"; }