forked from jeckman/YouTube-Downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
69 lines (66 loc) · 2.54 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Youtube Downloader</title>
<meta name="keywords" content="Video downloader, download youtube, video download, youtube video, youtube downloader, download youtube FLV, download youtube MP4, download youtube 3GP, php video downloader" />
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
<style type="text/css">
body {
padding-top: 40px;
padding-bottom: 40px;
background-color: #f5f5f5;
}
.form-download {
max-width: 300px;
padding: 19px 29px 29px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.form-download .form-download-heading,
.form-download .checkbox {
margin-bottom: 10px;
text-align: center;
}
.form-download input[type="text"] {
font-size: 16px;
height: auto;
margin-bottom: 15px;
padding: 7px 9px;
}
.userscript {
float: right;
margin-top: 5px
}
</style>
</head>
<body>
<form class="form-download" method="get" id="download" action="getvideo.php">
<h1 class="form-download-heading">Youtube Downloader</h1>
<input type="text" name="videoid" id="videoid" size="40" placeholder="VideoID" />
<input class="btn btn-primary" type="submit" name="type" id="type" value="Download" />
<p>Put in just the ID bit, the part after v=.</p>
<p>Example: http://www.youtube.com/watch?v=<b>Fw-BM-Mqgeg</b></p>
<!-- @TODO: Prepend the base URI -->
<?PHP
include_once('config.php');
function is_chrome(){
$agent=$_SERVER['HTTP_USER_AGENT'];
if( preg_match("/like\sGecko\)\sChrome\//", $agent) ){ // if user agent is google chrome
if(!strstr($agent, 'Iron')) // but not Iron
return true;
}
return false; // if isn't chrome return false
}
if(($config['feature']['browserExtensions']==true)&&(is_chrome()))
echo '<a href="ytdl.user.js" class="userscript btn btn-mini" title="Install chrome extension to view a \'Download\' link to this application on Youtube video pages."> Install Chrome Extension </a>';
?>
</form>
</body>
</html>