Very simple and short PHP-Shell script

Submitted by Anonymous (not verified) on Sun, 01/08/2012 - 17:05

You have a simple webhosting without ssh-shell login. Ie. you have to download wordpress first unzip it and upload to your server. But with shell terminal you can do it with two lines of commands. Why not use PHP as shell client?

<?php
$cmd = $_POST[cmd];
echo "<code>". shell_exec( $cmd );

echo "<form method=post>
<textarea name=cmd cols=80 rows=10>$cmd</textarea><br />
<input type=submit>
</form>
";

Add new comment