0

need a bit of assistance.

I have a Imdb grabber that grabs certain details from the site for example.

This code

$ps = $dom->getElementsByTagName('p');
for($i=0;$i<$ps->length;$i++){
$itemprop = $ps->item($i)->getAttribute("itemprop");
if ($itemprop=="description"){
$tmp = explode("See full summary",$ps->item($i)->textContent);
$tmp = explode("See full synopsis",$tmp[0]);
$res['summary'] = trim($tmp[0]);
break;
}
}

Grabs the description from imdb.com from this

<p itemprop="description"> description would be here </p>

So like the description how could i get the release date from this

<span class="nobr">
<a href="/title/tt2404311/releaseinfo?ref_=tt_ov_inf " title="See all release dates"> 13 September 2013<meta itemprop="datePublished" content="2013-09-13">(USA)
</a>
</span>

Could some help me out please.

john williams
  • 29
  • 2
  • 9
  • 1
    *"You may not use data mining, robots, screen scraping, or similar data gathering and extraction tools on this site, except with our express written consent as noted below."* — [IMDb Conditions of Use](http://www.imdb.com/help/show_article?conditions) – Quentin Sep 15 '13 at 19:18

1 Answers1

-1

Use regular expressions and preg_match to do your work :)

voTkaPoweR
  • 40
  • 2