...

View Full Version : Automatic number naming of files in php please help me with this I am using exec func



goheadtry
09-04-2007, 06:28 AM
$output is the variable I just need to know what to do with this.
I need the $output to be a numbered jpeg such as 0000001.jpg 0000002.jpg
and a numbered flv 0000001.flv 0000002.flv
so I just need the numbering part
how do I make it do this so that it is automaticly done lets say 0000001.jpg 0000002.jpg so the next one made will be 0000003.jpg and so on and so forth
and the next flv
made will be 0000003.flv and so on and so forth it does not need the extension I just need to make sure it does the sequence correctly so I don't get over written files etc.
By the way the command runs ffmpeg


<?php
$input = $_GET['input'];
$output = ?
exec 'ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$input.' -ar 22050 -ab 32 -f flv -s 320x240 /home/forbushj/public_html/2vidd/'.$output.'.flv';
exec 'ffmpeg -i /home/forbushj/public_html/uploadvidd/'.$input.' -an -ss 00:00:45 -an -r 1 -vframes 1 -y -s 150x100 /home/forbushj/public_html/2vidd/'.$output.'.jpg';
?>

meth
09-04-2007, 07:17 AM
http://www.webmaster-talk.com/php-forum/100475-file-manipulation-automatic-numbered-file-names.html#post451594



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum