shell-exec
Is there a list of ‘if’ switches anywhere?
Look at the Bash man page (man bash). The options are specified in the CONDITIONAL EXPRESSIONS section: CONDITIONAL EXPRESSIONS Conditional expressions are used by the [[ compound command and the test and [ builtin commands to test file attributes and perform string and arithmetic comparisons. Expressions are formed from the following unary or binary primaries. … Read more
What are the differences of system(), exec() and shell_exec() in PHP?
exec — Execute an external program system — Execute an external program and display the output shell_exec — Execute command via shell and return the complete output as a string so if you don’t need the output, I would go with exec. Further details: http://php.net/manual/en/function.exec.php http://php.net/manual/en/function.system.php http://php.net/shell_exec
How To Execute SSH Commands Via PHP
I would use phpseclib, a pure PHP SSH implementation. An example: <?php include(‘Net/SSH2.php’); $ssh = new Net_SSH2(‘www.domain.tld’); if (!$ssh->login(‘username’, ‘password’)) { exit(‘Login Failed’); } echo $ssh->exec(‘pwd’); echo $ssh->exec(‘ls -la’); ?>