-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding upload.php page, enabling users to upload videos to infoscreen.
- Loading branch information
Epameinondas Rontogiannis
committed
Sep 6, 2015
1 parent
3e981c4
commit 7dd0602
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!--Upload videos to Infoscreen using this page--> | ||
<html> | ||
<head> | ||
<title>P-Space Infoscreen Video Uploader </title> | ||
<meta http-equiv="Content-Type" content="text/html; charset= UTF-8"> | ||
</head> | ||
|
||
<body> | ||
<p style="text-align:center">P-Space Infoscreen</p> | ||
<p style="text-align:center">Video Upload</p> | ||
<br> | ||
<form name="video" action="http://192.168.1.5/infoscreen/upload.php" method="post"> | ||
<p style="text-align:center"> | ||
YouTube Video Link: <input type="text" name="link" value=""> | ||
</p> | ||
<p style="text-align:center"><input type="submit" value="Submit"></p> | ||
</form> | ||
<?php | ||
$vidlink=$_REQUEST["link"]; | ||
$cmd='youtube-dl -f "mp4/[height<720]" '.escapeshellarg($vidlink).' -o "/home/space/Projects/infoscreen/videos/%(id)s.m4v"'; | ||
echo "<br>"; | ||
if ($vidlink!=null) | ||
{ | ||
$res=shell_exec($cmd); | ||
echo "<pre style=\"text-align:center\">".$res."</pre>"; | ||
} | ||
?> | ||
</body> | ||
</html> |