2015-08-06 18:58:21 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* PHP web interface for youtube-dl (http://rg3.github.com/youtube-dl/)
|
|
|
|
* Redirect to video in best format
|
|
|
|
*
|
|
|
|
* PHP Version 5.3.10
|
|
|
|
*
|
|
|
|
* @category Youtube-dl
|
|
|
|
* @package Youtubedl
|
|
|
|
* @author Pierre Rudloff <contact@rudloff.pro>
|
|
|
|
* @license GNU General Public License http://www.gnu.org/licenses/gpl.html
|
|
|
|
* @link http://rudloff.pro
|
|
|
|
* */
|
2015-10-29 22:35:33 +00:00
|
|
|
use Alltube\VideoDownload;
|
2015-08-06 18:58:21 +00:00
|
|
|
require_once 'common.php';
|
|
|
|
if (isset($_GET["url"])) {
|
2015-09-04 20:45:55 +00:00
|
|
|
try {
|
|
|
|
$video = VideoDownload::getURL($_GET["url"]);
|
2015-08-06 19:21:56 +00:00
|
|
|
header('Location: '.$video['url']);
|
2015-09-04 20:45:55 +00:00
|
|
|
} catch (Exception $e) {
|
|
|
|
header('Content-Type: text/plain');
|
|
|
|
echo $e->getMessage();
|
2015-08-06 19:21:56 +00:00
|
|
|
}
|
2015-08-06 18:58:21 +00:00
|
|
|
}
|