This topic is locked

Events - after add & after edit

2/2/2010 1:24:37 PM
PHPRunner General questions
E
eyevr author

Is it possible to launch another application from within the PHPRunner Events process. I'd like to be able to launch a application and pass it parameters stored in a table, via a add or edit event.

Sergey Kornilov admin 2/2/2010

What kind of application you want to launch? Another PHP script, command line utility, something else?

E
eyevr author 2/2/2010



What kind of application you want to launch? Another PHP script, command line utility, something else?


It's a CENTOS based command line utility that launches videos. We can use a PHP script to launch the utility from a browser, but we'd rather launch it from inside PHPRunner after the user selects the run parameters. There may be many ways to do this, but we'd like do it after a add or edit event.

Sergey Kornilov admin 2/3/2010

You can use shell_exec() function for this purpose.
Example:

$output = shell_exec('ls -lart');

echo "<pre>$output</pre>";


More info:

http://php.net/manual/en/function.shell-exec.php