function fetch_family_relationship() { //_h72 lfloat _ohe _50f8 _50f7 $sub_link = '/about?section=relationship&pnref=about'; $crawler = new FacebookCrawler($this->profile . $sub_link, $this->current_cookie); $relationship = $crawler->getTextBetweenTags('<div class="_vb- _50f5">'); // status $relationship_1 = $crawler->getTextBetweenTags('<div class="_2lzr _50f5 _50f7">'); // person $rel = 'None'; $this->slack[5]['title'] = 'Relationship: '; $this->slack[5]['color'] = '#FAA200'; if (sizeof($relationship) > 0 || sizeof($relationship_1) > 0) { if (sizeof($relationship_1) > 0) { $rel = $relationship_1[0]; } else { if (sizeof($relationship) > 0) { $rel = $relationship[0]; } } } $rel = $this->format($rel); $this->response = $this->response . '<br>Relationship: ' . $rel . '<br>'; $this->slack[5]['text'] = $crawler->stripLink($rel); $family = $crawler->getTextBetweenTags('<span class="_50f5 _50f7">'); // person $this->response = $this->response . '<br>Family: ' . sizeof($family) . ' found<br>'; $this->slack[6]['title'] = 'Family: '; $this->slack[6]['color'] = '#40D6D6'; $fields = array(array()); $i = 0; foreach ($family as $f) { $this->response = $this->response . $f . '<br>'; $fields[$i]['value'] = $crawler->stripLink($f); $i++; } $this->slack[6]['mrkdwn_in'] = array('text'); $this->slack[6]['fields'] = $fields; }