Need PHP Script to Update Site

Discussion in 'Programming' started by mikem79, Jul 23, 2007.

  1. #1
    I have an old site consisting of about 500 pages of content. Unfortunately, the coding is not modular, so updating it is a chore.

    Anyway, I need some code replaced on every page. I can't use a text processor to do it because the code contains variables and therefore is not identical on every page.

    The flowchart is:

    - open file
    - find old code in file (footprints are distinct)
    - make note of the value of two existing variables
    - throw away old code
    - insert the value of these two variables into new code
    - write new code into the same place in the file
    - close file
    - do same thing to next file until there are no more files left.

    The deliverable is a functional php script that does the job.

    I can't code my way out of a paper bag, but if you can then this should be an easy one.

    Please PM me if you are interested. I am happy to pay you for one hour of your time even if this takes you five minutes to do, so please include your rate for one hour.

    Thanks.
     
    mikem79, Jul 23, 2007 IP
  2. asgsoft

    asgsoft Well-Known Member

    Messages:
    1,737
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    160
    As Seller:
    100% - 2
    As Buyer:
    100% - 0
    #2
    could you please PM me a worked example of the task?
     
    asgsoft, Jul 25, 2007 IP