I've made a php script, which executes things on my computer, for when I'm not at home. But I need a little help making it do exactly what I want, I'd like it to automatically scale the textarea and input box to the users browser, and be able to fully emulate the command line so I can type "cd .." and all that to navigate around instead of having to remember the exact path of everything, and also to keep the previous output, along with the command entered, as if it were really cmd.exe. It's source code is:[php]<html>
<head>
<title>
Command Script
</title>
</head>
<body bgcolor="#000">
<form action="run.php" method="post">
<textarea name="text" rows=20 cols="60" disabled="disabled"><?php
passthru($_POST['run']);
?></textarea>
<input type="text" name="run" size=80 />
</form>
</body>
</html>[/php]The file is run.php, it redirects to itself to run the arguments. If anyone can help me, it would be greatly appreciated. I run Windows XP Home, with Apache2.2 and PHP 5.2.5.
PHP Command Line
PHP Command Line
Webmaster Yoda: You must confront the cPanel. Then, and only then, a webmaster will you be.
Julius Caesar: Veni, vidi, posti
saja is "Secure AJAX for PHP" You jus need to create a class that do all you job, and using saja's framework run that class and function. It's ajax based solution, so i think it's da best fo u
http://saja.sourceforge.net/demo/
http://saja.sourceforge.net/demo/
-
- Posts: 1246
- Joined: Wed Feb 16, 2005 6:59 am
That is odd, could I ask what exactly you would try to run on your computer when you are away from the computer? Unless you attempt to connect to your computer to be able to use it from another computer I wouldn't really see the point, but none the less I am still quite confused as to how this would be a good thing. Not even LAN Networks work good for sharing programs only files and connectivity to the internet, so I would love to hear what you are going to use this for so I can understand
Reached 5000 Credits! The highest of any member on Smokyhosts! New milestone for Me!
Well mainly I want to be able to emulate teh command line to control things like... restarting Apache, SQL, and FTP, and query the status of services by using and also I need to be in certain folders sometimes but the one I've got uses cmd.exe which defaults to C:\**** and Settings\Francisco\ for all of the commands, as it starts a new cmd.exe for each command I enter.
Code: Select all
sc query <ServiceName>
Webmaster Yoda: You must confront the cPanel. Then, and only then, a webmaster will you be.
Julius Caesar: Veni, vidi, posti