Find and Replace script

Discussion in 'PHP' started by falco85, Jan 1, 2006.

  1. #1
    Hi,
    I have just signed an affiliate program and I'm facing the problem to make some SEO on it.
    They give you the starting site, with no SEO on it and I would like to put some keywords in the title and in the meta tags.
    Since they are 200+ pages (but the structure is the same), how can I automate the process? I would like to define some searches that should be done on every page, and then the script should replace the existing text with the one present in a database (so I can customize the entries for each single page).
    Do you know any script (free if any) that is doing this?
    Thank you :)
     
    falco85, Jan 1, 2006 IP
  2. n0other

    n0other Peon

    Messages:
    146
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Many advanced editors can do search and replace provided you know regular expressions (eclipse for example). Also, there should be tons of scripts written in awk (google for that), but I don't know if it's easy to get it running on windows. If it's a PHP script your looking for, well, I haven't heard of any.
     
    n0other, Jan 1, 2006 IP
  3. falco85

    falco85 Peon

    Messages:
    721
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thank you :) will look for those editors then, great!
     
    falco85, Jan 1, 2006 IP
  4. virtualkev

    virtualkev Peon

    Messages:
    364
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could try this BK ReplacEM
     
    virtualkev, Jan 1, 2006 IP
  5. Voyager2K

    Voyager2K Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Are you sure that exists editors able replacement keyphraze with variable text from database ?
     
    Voyager2K, Jan 1, 2006 IP
  6. n0other

    n0other Peon

    Messages:
    146
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Oh, my mistake. I *read* the data is stored in files. No there are no tools other than front-ends. Nor that there is a need of them. You'd be better asking this in database forum anyway :)
     
    n0other, Jan 1, 2006 IP
  7. tccoder

    tccoder Peon

    Messages:
    69
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Windows Grep is a good program for this
     
    tccoder, Jan 3, 2006 IP
  8. TMan

    TMan Peon

    Messages:
    126
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #8
    If the data is in a database you'll probably want something like the preg_replace() function, search php.net for it.
     
    TMan, Jan 3, 2006 IP
  9. legend2

    legend2 Well-Known Member

    Messages:
    1,537
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    115
    #9
    enter one unique key for every page then fetch the info from the database and use preg replace to replace this word with the fetched data.
     
    legend2, Jan 6, 2006 IP