video streaming with php and javascript
<p>hello so i am uploading several files to my apache server through a php script using the following script</p>

<pre><code>$uploaddir = 'photos/';
$file = basename($_FILES['userfile']['name']);
$uploadfile = $uploaddir . $file;
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) else
</code></pre>

<p>what i am aiming to do is for my server to compress and send them to a webpage in order to livestream the videos and delete them accordingly. how would i go around executing and coverting videos to mpeg or h264 format? Also should i redirect the end webpage everytime there is a new video to upload to the server or would long polling with javascript work with this?</p>
