-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
38 lines (37 loc) · 1.76 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php include('../connection.php'); ?>
<br><br><br><div class="container"> Download videos from youtube, twitch, and other platforms<br>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
</head>
<form method="post">
<input type="text" name="URL" size="75">
<select name="SelectType">
<option value="audio"> Audio (.MP3 only audio, no video) </option>
<option value="video"> Video (.MP4 with video and audio)</option>
</select>
<input type="submit" name="DL" id="DL" value="DownLoad" />
</form></div><br><br><br>
<?php if(array_key_exists('DL',$_POST)){
$selected = $_POST['SelectType'];
if ($selected == "audio")
{
DownLoadAudio();
}
else if ($selected == "video")
{
DownLoadVideo();
}
}
function DownLoadAudio()
{
$url = $_POST["URL"];
exec("audio\yt-dlp.exe URL $url quit", $output, $retval);
}
function DownLoadVideo()
{
$url = $_POST["URL"];
exec("video\yt-dlp.exe URL $url quit", $output, $retval);
} ?>