Skip to content

Commit

Permalink
Adding upload.php page, enabling users to upload videos to infoscreen.
Browse files Browse the repository at this point in the history
  • Loading branch information
Epameinondas Rontogiannis committed Sep 6, 2015
1 parent 3e981c4 commit 7dd0602
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions upload.php
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>

0 comments on commit 7dd0602

Please sign in to comment.