function fetch_basic_info() { $sub_link = '/about?section=contact-info&pnref=about'; $crawler = new FacebookCrawler($this->profile . $sub_link, $this->current_cookie); $titles = $crawler->getTextBetweenTags('<span class="_50f8 _50f4 _5kx5">'); $values = $crawler->getTextBetweenTags('<span class="_50f4">'); $this->response = $this->response . '<br><b>Basic Information: Found ' . sizeof($titles) . ' Elements<b><br>'; $this->slack[4]['title'] = 'Basic Information: '; $this->slack[4]['color'] = '#D400FF'; $size = sizeof($titles); $fields = array(array()); $message = ''; for ($i = 0; $i < $size; $i++) { if (strpos($values[$i], '<div') !== FALSE) { continue; } if (strpos($values[$i], '<span>') !== FALSE) { continue; } if ($i == $size - 1 && $i < sizeof($values)) { for ($z = $i + 1; $z < sizeof($values); $z++) { $values[$i] .= ' - ' . $values[$z]; } } $values[$i] = $this->format($values[$i]); $this->response .= $titles[$i] . ': ' . $values[$i] . '<br>'; $fields[$i]['title'] = $crawler->stripAllLink($titles[$i]); $fields[$i]['value'] = $crawler->stripAllLink($values[$i]); } $this->slack[4]['fields'] = $fields; $this->slack[4]['text'] = $message; }