function analyze() { $crawler = new FacebookCrawler($this->search, $this->current_cookie); $results = $crawler->getTextBetweenTags('<div class="_5d-5">'); $i = 1; $this->response .= 'Results: ' . sizeof($results) . '<br>'; foreach ($results as $r) { $link = $crawler->extractLinkAmount('<a class="_8o _8s lfloat _ohe"', $i); $image = $crawler->extractImageAmount(' aria-hidden="true" tabindex="-1">', $i); $username = str_replace('https://www.facebook.com/', '', $link); $username = substr($username, 0, strpos($username, '?')); $this->response .= '<br>Name: <a href="' . $link . '">' . $r . '</a><br>'; $this->response .= 'Username: '******'<br>'; $this->response .= 'Profile Picture: <br>'; $this->response .= '<img src="' . $image . '" width="100" height="100"<br><br>'; $this->stack[$i - 1]['title'] = 'Name: ' . $r; $this->stack[$i - 1]['text'] = 'Username: '******'image_url'] = 'Username: '******'color'] = '#556FA3'; $i++; } }
function fetch_life_events() { $crawler = new FacebookCrawler($this->profile, $this->current_cookie); $pics = $crawler->getTextBetweenTags('<div class="uiScaledImageContainer" style="width:101px;height:101px;">'); $this->response .= '<br>Sample of Pictures: <br>'; $i = 0; foreach ($pics as $p) { $this->response .= $p; $i++; if ($i == 3) { break; } } }