- A PHP web scraper class that utilizes the cURL library to scrape web page content. Scrape web pages using GET or POST methods. Also scrape web page content from asp.net based websites using form POST methods.
- Support for:
- Get Mathod
- POST Method
- ASP Calls
- Retrieve Page Contents by Markup Tag Names
- Retrieve Values from Form Fields
<?php include_once( './scraper.php' ); $scraper = new Scraper(); $pageUrl = 'http://maps.google.com'; $pageHtmlContent = $scraper->curl($pageUrl); ?>
<?php include_once( './scraper.php' ); $scraper = new Scraper(); $pageUrl = 'http://maps.google.com'; $pageHtmlContent = $scraper->curl($pageUrl, "93.118.xx.141:8800", "6USERR:8PASS1"); ?>
<?php $subHtmlContent = $scraper->getValueByTagName($pageHtmlContent, '<div class="itemlist">', '</div>'); ?>
- Include The Class scraper.php in your Working page header.
- Set some default settings.
- Get the page content by it's existing methods.
- Split your content by getValueByTagName methods if single content you are searching for.
- If grid data needed, split the content with a needle Ex: explode()
- Then loop it whole and get the content by getValueByTagName again to make the filnal array of grid data.
- Thats' all
Thanks