--- functions.php.old 2007-02-19 12:18:19.000000000 -0800 +++ functions.php 2007-02-19 13:14:22.000000000 -0800 @@ -232,11 +232,14 @@ $end = 0; //title extraction block - $start = strpos($titlePage,""); + //$start = strpos($titlePage,""); + $start = strpos($titlePage, ""); if($start !== FALSE) { - $end = strpos($titlePage,"<small>", $start); - $title = substr($titlePage,$start+22,$end-($start+22)); + //$end = strpos($titlePage,"<small>", $start); + $end = strpos($titlePage,"", $start); + //$title = substr($titlePage,$start+22,$end-($start+22)); + $title = substr($titlePage,$start,($end-$start-6)); // -6 to take out the (year) bit.. //get rid of double quotes - some movies such as "Rambo" include quotes in title. $title = trim(str_replace("\"", "", $title)); @@ -254,7 +257,7 @@ } //year extraction block - $start = strpos($titlePage,"/Sections/Years/", $end); + $start = strpos($titlePage,"/Sections/Years/"); if($start !== FALSE) { $year = substr($titlePage,$start+16,4);// 16="/Sections/Years/" @@ -265,11 +268,11 @@ } //image src extraction block - $start = strpos($titlePage,"alt=\"No poster or movie still available\"", $end); - if($start === FALSE) + $start = strpos($titlePage,"alt=\"No poster or movie still available\""); + if(($start === FALSE) || ($start === "")) { //$start = strpos($titlePage,"\"cover\"",", $start)+2; @@ -295,7 +298,7 @@ } //Genre extraction block. - $start = strpos($titlePage,"Genre:", $end); + $start = strpos($titlePage,"Genre:", $end); + $start = strpos($titlePage,"Plot Outline:", $end); + $start = strpos($titlePage,"User Rating:", $start); @@ -347,17 +351,17 @@ //actor extraction block - changed from first billed, to Cast overview, as this always starts // the block anyway. All we need is the start. - $start = strpos($titlePage,"Cast overview", $end); + $start = strpos($titlePage,"Cast overview"); //fix by Dick Balaska if(!$start) - $start = strpos($titlePage,"redited cast", $end); + $start = strpos($titlePage,"redited cast"); if(!$start) - $start = strpos($titlePage,"Cast:", $end); + $start = strpos($titlePage,"Cast:"); if(!$start) - $start = strpos($titlePage,"illed only:", $end); + $start = strpos($titlePage,"illed only:"); if($start !== FALSE) { @@ -401,10 +405,13 @@ unset($actorsBlock); //length extraction block - $start = strpos($titlePage,"Runtime:", $end); + $start = strpos($titlePage,"Runtime:", $start); + //$end = strpos($titlePage,"
", $start); + $end = strpos($titlePage,"min", $start); $length = trim(substr($titlePage,$start,$end-($start))); // Get rid of any Country specified Runtime.