returnError('No results for this query.', 404); } else { $html = file_get_html('https://facebook.com/pages/'.$param['u'].'?_fb_noscript=1') or $this->returnError('No results for this query.', 404); } } else { $this->returnError('You must specify a Facebook username.', 400); } $element = $html->find("[id^=PagePostsSectionPagelet-]")[0]->children(0)->children(0); if(isset($element)) { foreach($element->children() as $post) { $item = new \Item(); if($post->hasAttribute("data-time")) { //Clean the content of the page $content = preg_replace('/(?i)>
]+)>(.+?)div\ class=\"userContent\"/i', "", $post); $content = preg_replace('/(?i)>
]+)>(.+?)<\/div><\/div>