February 8th, 2000, 01:04 PM
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.
February 16th, 2000, 03:41 PM
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.