Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getSingleFromFirstShowing($url)
- {
- $item = $this->curl($url);
- $crawler = new Crawler($item);
- $html = $crawler->filter('.review p')->each(function (Crawler $node, $i)
- {
- $ht = trim($node->html());
- //filter out unneeded html
- if (strpos($ht, 'class="technotags"')) return false;
- if (strpos($ht, 'title="Posts by')) return false;
- return '<p>' . preg_replace('/<a.*?>(.*?)<\/a>/', '$1', $ht) . '</p>';
- });
- return trim(implode('', $html));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement