faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 8 people (25%) answered Yes
Recently 2 of 8 people (25%) answered Yes

Entry

Is there a way in PHP that I can run a script locally on a machine from a remote location?

Nov 28th, 2008 07:15
healthy man, dman, Erich Kolb, Nick s,


Although it is extremely dangerous to do so, there are ways.
If you want to execute a command, and then output it as it would look 
in a 
terminal, with newlines and all, do this:
$output = shell_exec($command);
$output = str_replace("\xa","",$output);
echo($output);
This will make it substitute the newlines for  tags, so you get a
normal output.
http://www.healthdothealth.com
http://www.healthxhealth.com
http://www.mesotheliomainmesothelioma.com
http://www.healthfirewall.com
http://www.flathealth.com
http://www.healthbodyguard.com