Пример #1
0
    }
    file_put_contents($XMLTV, $header . $chanlist . $guide . $footer);
}
function showHelp()
{
    echo 'EpgDownloader is a written in PHP, plugin based TV guide converter. With' . "\n";
    echo 'derivered plugins you can for example download tv schedule from website and' . "\n";
    echo 'export it to XMLTV EPG data format. The idea is to make easy conversion' . "\n";
    echo 'between various data found on websites providing TV guides into XMLTV possible.' . "\n\n";
    echo 'USAGE:' . "\n";
    echo "\t" . '-g   Generates XMLTV formatted output file with EPG data' . "\n";
    echo "\t" . '-l   Generates list of channels available on supported websites' . "\n\n";
    echo 'All configuration of this script can be done in config.php file.' . "\n\n";
}
date_default_timezone_set('UTC');
set_time_limit(0);
$parameters = 'gl';
$options = getopt($parameters);
loadPlugins();
if (sizeof($options)) {
    foreach ($options as $option => $value) {
        if ($option == 'g') {
            produceXmlTv();
        } elseif ($option == 'l') {
            listChannels();
        }
    }
} else {
    showHelp();
    exit(0);
}
Пример #2
0
while (list($cgk, $cgv) = each($chgdb)) {
    $chdb = db_loadChannels("chgroup", $cgv['abr']);
    if ($debug) {
        dbg("channels", $chdb);
    }
    print "<h2>" . $cgv['display_name'] . " (" . sizeof($chdb) . ")</h2>\n";
    if ($chdb) {
        $chdb = array_sort($chdb, $cgv['sortby']);
        print "<table width=\"75%\">\n";
        print "<tr class=\"tableTitle\">\n";
        print "  <td>Channel</td>\n";
        print "  <td>Display Name / XMLTV ID</td>\n";
        print "  <td>Grabber</td>\n";
        print "  <td>URL</td>\n";
        print "</tr>\n";
        listChannels($chdb);
        print "</table>\n";
    }
}
//
// disconnect from main database
//
switch ($dconf['dbtype']) {
    case 'mysql':
        sql_dodisconnect($myc);
        break;
}
?>

</body>
</html>