2014-03-13 19:07:56 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* PHP web interface for youtube-dl (http://rg3.github.com/youtube-dl/)
|
|
|
|
* Index page
|
2015-10-29 20:19:40 +00:00
|
|
|
*
|
2014-03-13 19:07:56 +00:00
|
|
|
* PHP Version 5.3.10
|
2015-10-29 20:19:40 +00:00
|
|
|
*
|
2014-03-13 19:07:56 +00:00
|
|
|
* @category Youtube-dl
|
|
|
|
* @package Youtubedl
|
2015-01-07 09:47:46 +00:00
|
|
|
* @author Pierre Rudloff <contact@rudloff.pro>
|
2014-03-13 19:07:56 +00:00
|
|
|
* @author Olivier Haquette <contact@olivierhaquette.fr>
|
|
|
|
* @license GNU General Public License http://www.gnu.org/licenses/gpl.html
|
|
|
|
* @link http://rudloff.pro
|
|
|
|
* */
|
2015-10-31 14:42:25 +00:00
|
|
|
require_once __DIR__.'/vendor/autoload.php';
|
2015-10-29 20:19:40 +00:00
|
|
|
use Alltube\VideoDownload;
|
|
|
|
|
2015-10-29 20:23:02 +00:00
|
|
|
$app = new \Slim\Slim(
|
|
|
|
array(
|
|
|
|
'view' => new \Slim\Views\Smarty()
|
|
|
|
)
|
|
|
|
);
|
2015-10-29 20:19:40 +00:00
|
|
|
$view = $app->view();
|
|
|
|
$view->parserExtensions = array(
|
2015-10-30 12:40:36 +00:00
|
|
|
__DIR__.'/vendor/slim/views/SmartyPlugins',
|
2015-10-31 10:35:18 +00:00
|
|
|
__DIR__.'/vendor/rudloff/smarty-plugin-noscheme/'
|
2015-10-29 20:19:40 +00:00
|
|
|
);
|
2015-10-29 20:23:02 +00:00
|
|
|
$app->get(
|
|
|
|
'/',
|
2015-10-29 21:32:36 +00:00
|
|
|
array('Alltube\Controller\FrontController', 'index')
|
2015-10-29 20:23:02 +00:00
|
|
|
);
|
|
|
|
$app->get(
|
|
|
|
'/extractors',
|
2015-10-29 21:32:36 +00:00
|
|
|
array('Alltube\Controller\FrontController', 'extractors')
|
2015-10-29 20:23:02 +00:00
|
|
|
)->name('extractors');
|
|
|
|
$app->get(
|
|
|
|
'/video',
|
2015-10-29 21:32:36 +00:00
|
|
|
array('Alltube\Controller\FrontController', 'video')
|
2015-10-29 20:23:02 +00:00
|
|
|
)->name('video');
|
2015-10-31 10:48:14 +00:00
|
|
|
$app->get(
|
|
|
|
'/redirect',
|
|
|
|
array('Alltube\Controller\FrontController', 'redirect')
|
|
|
|
);
|
|
|
|
$app->get(
|
|
|
|
'/json',
|
|
|
|
array('Alltube\Controller\FrontController', 'json')
|
|
|
|
);
|
2015-10-29 20:19:40 +00:00
|
|
|
$app->run();
|