2
Mar

imdb.com changes and videodb

   Posted by: Roguetech   in PHP programming, videodb

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:

preg_match('/<TITLE>(.*?) \([1-2][0-9][0-9][0-9].*?\)<\/TITLE>/i', $resp['data'], $ary);


Replace with:

preg_match('/<TITLE>(.*?) \(([1-2][0-9][0-9][0-9].*?)\)<\/TITLE>/i', $resp['data'], $ary);
$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]);

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]);
*/

MPAA ratings changed from:

preg_match('/List\?certificates=\s*USA:(.*?)&&heading=.*?;\s*USA:(.*?)">/si', $resp['data'], $ary);

to

preg_match('/search\/title\?certificates=us\|.*?">\s*USA:(.*?)<\/a>/si', $resp['data'], $ary);

Tags: , ,

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

hosting
 1 

Hey very nice blog!! Man .. Beautiful .. Amazing .. I will bookmark your blog and take the feeds also…

April 5th, 2010 at 6:43 pm

Leave a reply

You must be logged in to post a comment.