Parse error: syntax error, unexpected $end in /home/forbushj/public_html/zzupload.php on line 76
PHP Code:
<?php if(count($_POST) <1){ //show the form if(isset($_GET['error'])){ if($_GET['error'] == "nofile"){ $if_error="Please choose a file to upload."; }elseif($_GET['error'] == "notvid"){ $if_error="The file you selected is not a video."; }elseif($_GET['error'] == "couldnotupload"){ $if_error="Your file could not be uploaded."; }elseif($_GET['error'] == "noconvert"){ $if_error="We're sorry, but your video could not be converted for some reason."; } }else{ $if_error=""; } echo "<form name=\"uploadform\" action=\"\" method=\"post\" enctype=\"multipart/form-data\"> $if_error <!--THE_REST_OF_YOUR_FORM_GOES_HERE--> </form>"; }else{ //do the processing
$ffmpeg = '/usr/bin/ffmpeg';//location of ffmpeg binary $bitrate = '32';//bitrate for audio options are 16,32,64 $ext = '.flv';//Extension of output video files $extb = '.jpg';//Extension of image $vidsize = '320x240'; //video size $imgsize = '150x100';//image size for menu $force = 'flv';//Force video format to $sstime = '00:00:35';//time to take screenshot $samprate ='22050'; // Sample rate choices are as follows 11025, 22050, 44100) //Converts uploaded video with FFmpeg binary if(!exec('$ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$vidIN.' -ar $samprate -ab $bitrate -f flv -s $vidsize /home/forbushj/public_html/vidd/'.$vidout.'.$ext.') || !exec('$ffmpeg -i /home/forbushj/public_html/vidd/'.$vidout.''.$ext.' -s $imgsize -an -ss $sstime -an -r 1 -vframes 1 -y -f image2 /home/forbushj/public_html/pic/video/'.$vidout.'.$extb.')){ header("location: {$_SERVER['PHP_SELF']}?error=noconvert"); exit(); }
//write to mysql $linkID = @mysql_connect("localhost","ffgdfg","$141dfg") or die("Could not connect to MySQL server"); @mysql_select_db("forbushj_onetest") or die("Could not select database");