Page 1 of 1

PHP Script to write/run a file on a computer

Posted: Sun Aug 22, 2010 10:36 am
by Darknessattack2
Is it possible to create a PHP script that would connect to a computer over the internet and write/run a file on it?

Basically, this is what I want to accomplish:

1) User clicks button on webpage
2) Script sends .txt file to computer and saves it in a predefined folder on the computer

OR

2) Script orders computer to run a program

My web server is from http://www.freewebhostingarea.com/ , so I can't install anything custom on it.

I have access to the computer that I wish to send the instructions to. Computer is running Windows XP.

If this seems like an unclear request I apologize, I am not very experienced with coding in general. I would appreciate any help or pointers regarding this.

Re: PHP Script to write/run a file on a computer

Posted: Sun Aug 22, 2010 10:45 am
by oscardog
I am fairly sure this cannot be accomplished with PHP alone. The actual client side of things could possibly be done with PHP but I think you would need to use C or something to do the 'connect and save a file to a remote computer'.

Re: PHP Script to write/run a file on a computer

Posted: Sun Aug 22, 2010 11:02 am
by Darknessattack2
oscardog wrote:I am fairly sure this cannot be accomplished with PHP alone. The actual client side of things could possibly be done with PHP but I think you would need to use C or something to do the 'connect and save a file to a remote computer'.
Well I do have access to the remote computer, so maybe I could run a program on the remote computer that would listen for some sort of query from the server?