#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    2
    Rep Power
    0
    Does anyone know of a way to replace text in web pages, dynamically, before they are returned to the client?

    For example, replace all occurances of a company name with a link to that companies page?

    Ideally, the solution would work with any HTTP text, not just from PHP.

    Any suggestions?

    Thanks.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Location
    Bremen
    Posts
    11
    Rep Power
    0
    Well you can READ the pages in with a PHP script and the fopen() function. Read it all in into a string and do a ereg_replace("whatever","withsomething",$string) or str_replace() afterwards. This should help ... then you can simply echo $string; and the page is displayed the way u want it.

Similar Threads

  1. help with tables and wordwrapping
    By junkedBrian613 in forum PHP Development
    Replies: 2
    Last Post: February 15th, 2004, 05:42 PM
  2. Simple find and replace word search for a text file with php?
    By rabid lemming in forum PHP Development
    Replies: 4
    Last Post: February 1st, 2004, 09:37 PM
  3. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  4. float question
    By yeah-yeah in forum HTML Programming
    Replies: 10
    Last Post: January 15th, 2004, 03:59 PM
  5. Javascript scrollbar - stuck on last bit
    By NayMyoSan in forum JavaScript Development
    Replies: 0
    Last Post: January 3rd, 2004, 12:05 PM

IMN logo majestic logo threadwatch logo seochat tools logo