Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
??variable input help on upload?? -Please look... -Please help if you can...
Old 05-26-2008, 03:35 PM ??variable input help on upload?? -Please look... -Please help if you can...
goheadtry's Avatar
Webmaster Talker

Posts: 730
Name: John
Location: United States of America, California
Trades: 0
I need help with the part where it says
Code:
exec('ffmpeg -i . basename( $_FILES['uploadedfile']['name']). -ar 22050 -ab 32 -f flv -s 320x240 /home/forbushj/www/video.flv');
'

I need to make sure that it is getting the file path of the uploaded file correctly and that the part where it says /home;forbushj/www/video.flv is changed to the same as the uploaded file, but with and flv extension.

PHP Code:
<?php
//home/forbushj/www/vidtemp/
$target "vidtemp/";
$target $target basename$_FILES['uploaded']['name']) ;
$ok=1;

//This is our size condition
if ($uploaded_size 350000)
{
echo 
"Your file is too large.<br>";
$ok=0;
}

//This is our limit file type condition
if (!($uploaded_type=="video/x-ms-asf")) {
echo 
"You may only upload movies.<br>";
$ok=0;
}

//Here we check that $ok was not set to 0 by an error
if ($ok==0)
{
Echo 
"Sorry your file was not uploaded";
}

//If everything is ok we try to upload it
else
{
if(
move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
//COnvert the video
//echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
exec('ffmpeg -i . basename( $_FILES['uploadedfile']['name']). -ar 22050 -ab 32 -f flv -s 320x240 /home/forbushj/www/video.flv');
}
else
{
echo 
"Sorry, there was a problem uploading your file.";
}
}
?>
__________________
Free $1 gift card when you signup at
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

goheadtry is offline
Reply With Quote
View Public Profile Visit goheadtry's homepage!
 
 
Register now for full access!
Old 05-26-2008, 04:45 PM Re: ??variable input help on upload?? -Please look... -Please help if you can...
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
PHP Code:
<?php
//home/forbushj/www/vidtemp/
$target "vidtemp/";
$target $target basename$_FILES['uploaded']['name']) ;
$ok=1;

//This is our size condition
if ($uploaded_size 350000)
{
echo 
"Your file is too large.<br>";
$ok=0;
}

//This is our limit file type condition
if (!($uploaded_type=="video/x-ms-asf")) {
echo 
"You may only upload movies.<br>";
$ok=0;
}

//Here we check that $ok was not set to 0 by an error
if ($ok==0)
{
Echo 
"Sorry your file was not uploaded";
}

//If everything is ok we try to upload it
else
{
if(
move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
//COnvert the video
//echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
exec('ffmpeg -i 'basename$_FILES['uploadedfile']['name']).' -ar 22050 -ab 32 -f flv -s 320x240 /home/forbushj/www/video.flv');
}
else
{
echo 
"Sorry, there was a problem uploading your file.";
}
}
?>
You forgot to put ' in before the .
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Reply     « Reply to ??variable input help on upload?? -Please look... -Please help if you can...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13186 seconds with 12 queries