require_once('simple_html_dom.php'); $url = 'http://www.yahoo.co.jp/'; $user_agent = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)"; $dom = file_get_html($url,false, stream_context_create( array( 'http' => array( 'header' => "User-Agent: " . $user_agent . "\r\n") ) ) ); foreach( $dom->find("div[class=topicsindex]",0)->find('li') as $data ) echo $data->innertext.'
';