'); exit; } header('Content-type: text/html; charset=utf-8'); $upload=htmlspecialchars(basename($_FILES['fileToUpload']['name'])); $key=$_POST['streamkey']; $date=$_POST['date']; $time=$_POST['time']; $dir='streams/'; $name=$key.'.'.$date.'_'.$time; $file=$dir.$name.'.upload'; print(' Uploading

Uploading

File: '.$upload.'
'); ob_flush(); flush(); $now=date('Y-m-dH:i'); if(strcmp($now, $date.$time)>0){ back('Scheduling '.$now.' in the past: '.$date.' '.$time); } $nextyear=date('Y-m-dH:i', strtotime('+1 year')); if(strcmp($nextyear, $date.$time)<0){ back('Scheduling too far into the future: '.$date.' '.$time); } if($_FILES['fileToUpload']['error']!=UPLOAD_ERR_OK){ back('Error uploading the file'); } if(!move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $file)){ back('Error moving the file'); } back('File is now being encoded to "'.$name.'.mp4"
Scheduled for '.$date.' at '.$time); ?>