(.+?)span/', $templine,$matches); $tijdstip=str_replace('/','',$matches[1]); $tijdstip=str_replace('t_','',$tijdstip); $bt1=substr( $tijdstip,0,2); $bt2=substr( $tijdstip,3,2); $et1=substr( $tijdstip,6,2); $et2=substr( $tijdstip,9,2); $begintijd = $bt1*60+$bt2; $eindtijd = $et1*60+$et2; if ($begintijd<400) {$begintijd=$begintijd+1440;}; if ($eindtijd<400) {$eindtijd=$eindtijd+1440;}; $begintijd = substr( $tijdstip,0,5); $eindtijd = substr( $tijdstip,6,5); $progteller=$progteller+1; $num=$num+1; preg_match('/px">(.+?)a>/', $templine,$matches,0,100); $programmanaam=str_replace('/','',$matches[1]); preg_match('/href="(.+?)" target=/', $templine,$matches); $verwijs =$matches[1]; $zenderprogs[$zenderteller]=$zenderprogs[$zenderteller]+1; $progzender[$progteller]=$zendernaam; $progzender2[$progteller]=$zenderteller; $progbegin[$progteller]=$begintijd; $progbegin2[$progteller]=$begintijd; $progeind[$progteller]=$eindtijd; $prognaam[$progteller]=$programmanaam; $progverwijs[$progteller]=$verwijs; $progrel[$progteller]=$rel; $hulpje='0'; $rel='x'.$rel.'x'; $verwijs=str_replace('http://www.nu.nl/tvgids/site/show/','',$verwijs); $verwijs=substr($verwijs,0,6); $abstract=$begintijd.'-'.$eindtijd.' '.$zendernaam.': '.$programmanaam.'|'; if (strpos($rel, 'film',1) !== false) { $titelfilm= str_replace(' ','%20',$programmanaam); $abstract=$begintijd.'-'.$eindtijd.' '.$zendernaam.': '.$programmanaam.'|'; } $th1=substr($begintijd,0,2); $sh1=(int)$th1; if ($sh1>5) { $abstract = ' '.$abstract;}; $inhoud=''; //maak per rubriek een string, gescheiden door | met daarin de programma-info. stop de strings in rubriek-arrays wil[] if (strpos($rel, 'amusement',1) !== false) { $hulpje=$hulpje.'1';$wil[1]=$wil[1].'  amusement  '.$abstract;}; if (strpos($rel, 'comedy',1) !== false) { $hulpje=$hulpje.'2';$wil[2]=$wil[2].'  comedy  '.$abstract;}; if (strpos($rel, 'documentaire',1) !== false) { $hulpje=$hulpje.'3';$wil[3]=$wil[3].'  documentaire  '.$abstract;}; if (strpos($rel, 'film',1) !== false) { $hulpje=$hulpje.'4';$wil[4]=$wil[4].'  film  '.$abstract;}; if (strpos($rel, 'informatief',1) !== false) { $hulpje=$hulpje.'5';$wil[5]=$wil[5].'  informatief  '.$abstract;}; if (strpos($rel, 'jeugd',1) !== false) { $hulpje=$hulpje.'6';$wil[6]=$wil[6].'  jeugd  '.$abstract;}; if (strpos($rel, 'kunstcultuur',1) !== false) { $hulpje=$hulpje.'7';$wil[7]=$wil[7].'  kunst/cultuur  '.$abstract;}; if (strpos($rel, 'misdaad',1) !== false) { $hulpje=$hulpje.'8';$wil[8]=$wil[8].'  misdaad  '.$abstract;}; if (strpos($rel, 'muziek',1) !== false) { $hulpje=$hulpje.'9';$wil[9]=$wil[9].'  muziek  '.$abstract;}; if (strpos($rel, 'natuur',1) !== false) { $hulpje=$hulpje.'a';$wil[10]=$wil[10].'  natuur  '.$abstract;}; if (strpos($rel, 'nieuwsactualiteiten',1) !== false) { $hulpje=$hulpje.'b';$wil[11]=$wil[11].'  nieuwsactualiteiten  '.$abstract;}; if (strpos($rel, 'overig',1) !== false) { $hulpje=$hulpje.'c';$wil[12]=$wil[12].'  overig  '.$abstract;}; if (strpos($rel, 'religieus',1) !== false) { $hulpje=$hulpje.'d';$wil[13]=$wil[13].'  religieus  '.$abstract;}; if (strpos($rel, 'seriesoap',1) !== false) { $hulpje=$hulpje.'e';$wil[14]=$wil[14].'  seriesoap  '.$abstract;}; if (strpos($rel, 'sport',1) !== false) { $hulpje=$hulpje.'f';$wil[15]=$wil[15].'  sport  '.$abstract;}; $hulpje='
'; $progcode[$progteller]=$hulpje; $proginhoud[$progteller]=$inhoud; $zenderbegin=strpos($templine, "Klik om te verslepen"); if ($zenderbegin !== false) { $zendernaam=substr($templine, $zenderbegin+23); $zendereind=strpos($zendernaam, "/h3"); $zendernaam=substr($zendernaam, 0,$zendereind); if ($zendernaam=='Eén') { $zendernaam='Een' ;}; if ($zendernaam=='Nederland 3 & Z@pp') { $zendernaam='Nederland 3' ;}; $zenderteller=$zenderteller+1; $zenderlijst[$zenderteller]=$zendernaam; } //einde leesregel } //einde leesalles } function mooi($intijd) { $beter=$intijd; if ($intijd>23) {$beter=$beter-24;}; return $beter; } ?>