Reputation: 41
Been trying to find an answer for this. There is a lot of info on running a php script from the linux command line, however, what I would like to know is how to run a linux command line program from a web page via php.
What i'm after is on the fly processing of files from this program: http://sk1project.org/modules.php?name=Products&product=uniconvertor
Is this possible with php, or would i have to use another language?
Upvotes: 0
Views: 385
Reputation: 43
i think you can just use the exec()-command in PHP
For example, I'm using FFMPEG to convert uploaded video's to flv.
You can execute a FFMPEG-command through php like this:
exec("ffmpeg -i $input -s 320x240 -ar 44100 -r 12 $output");
Upvotes: 1
Reputation: 36433
The system
function is what you are looking for.
http://php.net/manual/en/function.system.php
Upvotes: 1
Reputation: 272497
You have various options, such as system()
and shell_exec()
.
Upvotes: 1