PHP Script to write/run a file on a computer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Darknessattack2
Forum Newbie
Posts: 2
Joined: Sun Aug 22, 2010 10:24 am

PHP Script to write/run a file on a computer

Post 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.
oscardog
Forum Contributor
Posts: 245
Joined: Thu Oct 23, 2008 4:43 pm

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

Post 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'.
Darknessattack2
Forum Newbie
Posts: 2
Joined: Sun Aug 22, 2010 10:24 am

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

Post 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?
Post Reply