Version 0.2 Created by Vincent Blanchon
SimplePageCrawler is a web page crawler. You can get informations :
- Title
- Meta (decsription, etc.)
- H1, H2, etc.
- List of the images
- List of the links
Get page informations :
$crawler = $this->getServiceLocator('SimplePageCrawler');
$page = $crawler->get('http://www.nytimes.com');
echo sprintf('The title is "%s"', $page->getTitle());
echo sprintf('The description is "%s"', $page->getMeta('description'));
You can use th action helper :
$page = $this->simplePageCrawler('http://www.nytimes.com');
echo sprintf('The title is "%s"', $page->getTitle());
echo sprintf('The description is "%s"', $page->getMeta('description'));