Using PHP to update a remote file

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
ibanez270dx
Forum Commoner
Posts: 74
Joined: Thu Jul 27, 2006 12:06 pm
Location: Everywhere, California

Using PHP to update a remote file

Post 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
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Re: Using PHP to update a remote file

Post 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.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post 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.
(#10850)
Post Reply