setUrl($url); $this->content = $this->getPage(); } public function setUrl( $url ) { if(!empty($url)) { $this->pageUrl = (string) $url; } } public function getUrl() { return $this->pageUrl; } private function getPage() { return file_get_contents($this->pageUrl); } public function getContent() { //echo $this->content; return $this->content; } abstract function parse(); } class YahooTravel extends Parser { public function parse() { } } $y = new YahooTravel('http://travel.yahoo.com/p-reviews-322437-prod-hotel-action-read-ratings_and_reviews-i;_ylt=AioDJMcIYnfZ0KDjF86t4gniphQB'); $html = $y->getContent(); $i = 0; while( FindInsideIncluding($html, '
', '
')) { $reviews[] = FindInsideIncluding($html, '
', '
'); $i++; $html = str_replace($str, '', $html); if($i == 10) { break; } } print_r($reviews); ?> // returns Array ( [0] => [1] => [2] => [3] => [4] => [5] => [6] => [7] => [8] => [9] => )