Remove unused code
Unit tests for every function Error handling
This commit is contained in:
parent
de96f30d57
commit
11ff0fa9c4
7 changed files with 159 additions and 138 deletions
|
@ -14,10 +14,11 @@
|
|||
require_once 'common.php';
|
||||
require_once 'download.php';
|
||||
if (isset($_GET["url"])) {
|
||||
$video = VideoDownload::getURL($_GET["url"]);
|
||||
if (isset($video['url'])) {
|
||||
try {
|
||||
$video = VideoDownload::getURL($_GET["url"]);
|
||||
header('Location: '.$video['url']);
|
||||
} else {
|
||||
echo "Can't find video";
|
||||
} catch (Exception $e) {
|
||||
header('Content-Type: text/plain');
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue