function input($url, $sub = false)
{
    $html = cacheurl($url);
    preg_match_all('|<item>(.*?)</item>|is', $html, $matches);
    foreach ($matches[1] as $key => $row) {
        $tmp_array = preger(array("title", "link", "description", "pubDate"), $row);
        $tmp_array['url'] = $tmp_array['link'];
        $tmp_array['title'] = reducehtml($tmp_array['title']);
        $out[$tmp_array['title']] = $tmp_array;
    }
    return $out;
}
function geturl($pfad)
{
    global $links;
    $r = explode("/", trim($pfad, "/"));
    $links = input($links[$r[2]]);
    $link = $links[$r[3]];
    $videos = tvtotal_video_list($link['url']);
    $selected_vid = $videos[$r[4]];
    $page = cacheurl('http://tvtotal.prosieben.de/tvtotal/includes/php/videoplayer_metadata.php?id=' . $selected_vid['id']);
    $cdata = preger('url_flv', $page);
    preg_match('|<\\!\\[CDATA\\[(.*?)\\]\\]>|', $cdata, $filter);
    return $filter[1];
}
function input($url)
{
    $t_html = cacheurl($url);
    preg_match_all('|<listitem>(.*?)</listitem>|si', $t_html, $row);
    foreach ($row[1] as $mov) {
        $tmp_array = preger(array("videoid", "thema", "headline", "date", "thumb"), $mov);
        $tmp_array['time'] = strtotime($tmp_array['date']);
        $tmp_array['title'] = reducehtml($tmp_array['thema'] . " " . $tmp_array['headline']);
        $tmp_array['type'] = "file";
        $out[$tmp_array['title']] = $tmp_array;
    }
    return $out;
}
function input($url)
{
    $t_html = cacheurl($url, false);
    # echo $t_html;
    preg_match_all('/<item>(.*?)<\\/item>/si', $t_html, $row);
    foreach ($row[1] as $mov) {
        $tmp_array['title'] = reducehtml(preger("title", $mov));
        preg_match('/url="(.*?)"/is', $mov, $matches);
        $tmp_array['url'] = $matches[1];
        $tmp_array['type'] = "file";
        $out[$tmp_array['title']] = $tmp_array;
    }
    return $out;
}