-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·42 lines (38 loc) · 1.23 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
39
40
41
42
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>PHP YOUTUBE DOWNLOADER</title>
<link href="download_css.css" type="text/css" rel="stylesheet">
<script>
function getVideo(videoID) {
document.getElementById("video_info").innerHTML="Getting information... Please wait";
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else { // code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
document.getElementById("video_info").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","download.php?videoid="+videoID,true);
xmlhttp.send();
}
</script>
</head>
<body>
<div class="main" style="width:460px; min-height:400px; border:#333333 1px solid; padding:10px;">
<div class="video_form">
<form>
<input type="text" name="videoID" onKeyUp="getVideo(this.value)" placeholder="Paste URL Here" style="height:25px;width:96%; padding:6px; border:#00CCFF 2px solid">
</form>
</div>
<div id="video_info" style="margin-top:20px;">
</div>
</div>
</div>
</body>
</html>