ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Coding Snack Guidelines

IDEA: php? program on webhost needed

(1/2) > >>

IdiotSavant:
I have a large website (over 5k pages in many directories) that I need to change the phone number in each page.  I don't know how easy or hard it would be to code something to run on the webserver that would find and replace a string of text.
Any attempts will be appreciated.
IdiotSavant

x16wda:
You could look at <ahem> FART (that's Find And Replace Text).

Or, similarly, GSAR (General Search And Replace) would do it.

I have used both in several batch processes.

IdiotSavant:
Thanks, I'll check them both out.
IS

IdiotSavant:
It looks to me like these both are windoze.  My webhost account is a linux account. Guess I should have made that clear.
Thanks though
IS

mouser:
I'm sure there is some existing php code to do search+replace over multiple files, BUT if someone wants to make a new tool that does this, I have written some php classes and code that should make the job much easier, in my (open source) mwimporter package.  Again, it does *not* do search and replace, but it will nicely iterate through recursive directories of files and do a few more helpful things that could be used as a starting point.

Navigation

[0] Message Index

[#] Next page

Go to full version