imdb.com has changed some of their formatting. Release year and mpaa ratings have changed. I'm not sure what changed about release year, but what I did to fix videodb:
Find in engines/imdb.php:
Replace with:
preg_match('/<TITLE>(.*?) \(([1-2][0-9][0-9][0-9].*?)\)<\/TITLE>/i', $resp['data'], $ary);
$data['year'] = $ary[2];
$data['year'] = $ary[2];
Find:
preg_match('/<A HREF="\/Sections\/Years\/[1-2][0-9][0-9][0-9]\/?">([1-2][0-9][0-9][0-9])<\/A>/i', $resp['data'], $ary);
$data['year'] = trim($ary[1]);
$data['year'] = trim($ary[1]);
Replace with:
/*
preg_match('/<A HREF="\/Sections\/Years\/[1-2][0-9][0-9][0-9]\/?">([1-2][0-9][0-9][0-9])<\/A>/i', $resp['data'], $ary);
$data['year'] = trim($ary[1]);
*/
preg_match('/<A HREF="\/Sections\/Years\/[1-2][0-9][0-9][0-9]\/?">([1-2][0-9][0-9][0-9])<\/A>/i', $resp['data'], $ary);
$data['year'] = trim($ary[1]);
*/
MPAA ratings changed from:
to
This entry was posted
on Tuesday, March 2nd, 2010 at 2:16 pm and is filed under PHP programming, videodb.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
One comment
Leave a reply
You must be logged in to post a comment.