I worked out various regex to scrape the data.
Here I can scrape image from the page source:
Here I scraped data from table td
<?php
$s = file_get_contents('http://www.altassets.net/altassets-events');
$matches = array();
preg_match_all("/<tr>(.*)<\/tr>/sU", $s, $matches);
$trs = $matches[1]; $td_matches = array();
foreach ($trs as $tr) { $tdmatch = array();
preg_match_all("/<td>(.*)<\/td>/sU", $tr, $tdmatch);
$td_matches[] = $tdmatch[1]; } var_dump($td_matches);
//print_r($td_matches);
?>
similarly image and titles too.
But how to scrape data from <p>
tag with specific class name?
<p class="review_comment ieSucks" itemprop="description" lang="en"> Some text </p>
Consider this page,
http://www.yelp.com/biz/fontanas-italian-restaurant-cupertino
this is just example, just want to know procedure. class name and tag name can be changed
I want to scrape review and it's Rate value from the page