Welcome Guest.   Make a donation to an author on the site April 19, 2014, 10:17:48 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: php? program on webhost needed  (Read 1195 times)
IdiotSavant
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« on: May 21, 2012, 09:18:08 PM »

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
Logged
x16wda
Supporting Member
**
Posts: 389


what am I doing in this handbasket?

see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: May 21, 2012, 09:43:33 PM »

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.
Logged

vi vi vi - editor of the beast
IdiotSavant
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« Reply #2 on: May 21, 2012, 09:53:22 PM »

Thanks, I'll check them both out.
IS
Logged
IdiotSavant
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« Reply #3 on: May 21, 2012, 10:02:12 PM »

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
Logged
mouser
First Author
Administrator
*****
Posts: 32,674



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: May 21, 2012, 10:25:54 PM »

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.
« Last Edit: May 22, 2012, 07:15:00 AM by mouser » Logged
IdiotSavant
Participant
*
Posts: 4

View Profile Give some DonationCredits to this forum member
« Reply #5 on: May 22, 2012, 06:42:21 AM »

 Thmbsup After looking at your package, I thought about my situation again and realized I already have a sitemap I could operate on so now I just need to find something that will take that and search/replace over the files.  I'll look for it.
IS
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.028s | Server load: 0.17 ]