executing programs from a web page

Piers Rowan piers.rowan at recruitonline.com.au
Wed May 8 16:11:17 CST 2013

On 05/08/2013 03:34 PM, Jaroslav wrote:
> Hi all,
> I am looking for an answer (preferably simple) to the following questions:
> 1) Can I (and how to) execute a program from a web page (say, in html or
>     javascript)?

You most likely could use PHP

echo '<pre>';

// Outputs all the result of shellcommand "ls", and returns
// the last output line into $last_line. Stores the return value
// of the shell command in $retval.
$last_line = system('ls', $retval);

// Printing additional info
echo '
<hr />Last line of the output: ' . $last_line . '
<hr />Return value: ' . $retval;
?> |


> 2) If yes, can I (and how to) pass input data to this program and also
>     to incorporate the output into the web page?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.linuxsa.org.au/pipermail/linuxsa/attachments/20130508/cad5b581/attachment.html 

More information about the linuxsa mailing list