0

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?

0

4 Answers 4

1

You have various options, such as system() and shell_exec().

Sign up to request clarification or add additional context in comments.

Comments

1

The system function is what you are looking for.

http://php.net/manual/en/function.system.php

Comments

1

Both passthru and exec should be able to do that for you.

Comments

1

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");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.