function checkhtm($host)
{
    $content = connecttohttpd("/slbbc1.htm", $host);
    $now = getdate();
    $dagnr = $now["mday"];
    $dag = $now["weekday"];
    $inhoud = split("\n", $content);
    reset($inhoud);
    $inhoud = array_reverse($inhoud);
    while ($lijn = array_pop($inhoud)) {
        if (preg_match("/{$dag}/", $lijn)) {
            if (preg_match("/.*?\\<A HREF=\"(\\d).*\\>(\\w+) (\\d+).*?\\<BR\\>.*/", $lijn)) {
                $lijn = preg_replace("/.*?\\<A HREF=\"(\\d).*\\>\\w+ (\\d+).*\\<BR\\>.*/", "\\1 \\2", $lijn);
                list($numberofday, $site_dagnr) = split(" ", $lijn);
                if ($dagnr == $site_dagnr) {
                    return $numberofday;
                }
                // end if
            }
            // end if inner preg_match
        }
        // end if outer preg_match
    }
    // end while
}
            }
            if ($flag == 2) {
                $pid = $sql->last_record($result);
                $sql->query("update program set stop=INTERVAL 1 DAY + stop where pid={$pid}");
            }
        }
        $count++;
    }
    // end while
}
// end function printit
if ($WEB) {
    print_header_open();
    print_title("Collecting ...");
    print_header_close();
}
while (list($zender, $url) = each($urls)) {
    $uur = array();
    $programma = array();
    $inhoud = array();
    if ($WEB) {
        print "Slurping {$zender}...<br>\n";
    }
    $inhoud = connecttohttpd($url, $host);
    list($programma, $uur, $film) = parsecontent($inhoud, $programma, $uur, $film);
    printit($programma, $uur, $film, $zender);
}
if ($WEB) {
    print "done<br>";
    print_page_close();
}