Page 1 of 1

Using PHP to update a remote file

Posted: Tue Oct 23, 2007 3:16 pm
by ibanez270dx
Hi everyone,
I have a question... My company wants to update a file that is on about 100 computers on our network. I basically want to have a PHP page they can navigate to on the network that will find the file on their computer, search for a certain string (not necessarily with whitespace separating it from the rest of the text, its an HTML file) and replace it somewhere else in the file, which would also need to be found.

Is this possible with PHP? I am not really sure...

Thanks,
- Jeff

Re: Using PHP to update a remote file

Posted: Tue Oct 23, 2007 3:34 pm
by Zoxive
ibanez270dx wrote:Hi everyone,
I have a question... My company wants to update a file that is on about 100 computers on our network. I basically want to have a PHP page they can navigate to on the network that will find the file on their computer, search for a certain string (not necessarily with whitespace separating it from the rest of the text, its an HTML file) and replace it somewhere else in the file, which would also need to be found.

Is this possible with PHP? I am not really sure...

Thanks,
- Jeff
Entirely? No. Unless each of those 100 computers had PHP itself on it, when maybe some soap calls. Or if all 100 of those computers has those files you want to change Shared & Full Rights on the network.

Posted: Wed Oct 24, 2007 1:22 pm
by Christopher
PHP can certainly parse the file and replace part of it. There are many ways PHP can connect with other computers, or it can call a command line program to do that.