27 lines
518 B
PHP
27 lines
518 B
PHP
<?php
|
|
system( "clear" );
|
|
|
|
require_once 'config.inc.php';
|
|
|
|
echo "\n";
|
|
echo "Please enter the number from->to to download karaoke-files";
|
|
echo "\n";
|
|
$from = readline( "@From[int] " );
|
|
echo "\n";
|
|
$to = readline( "@To[int] " );
|
|
|
|
|
|
$downloader = new Downloader();
|
|
for( $i=$from; $i <= $to; $i++ )
|
|
{
|
|
try
|
|
{
|
|
$downloader->requestSong( $i );
|
|
}catch ( RuntimeException $e )
|
|
{
|
|
echo "An error occurred while processing the download.\n";
|
|
echo $e->getMessage() . "\n";
|
|
}
|
|
}
|
|
|