If you don't store your complete pages in a mySQL database - use a pre-made script! You'd need to write something which indexes your pages, stores them into a database, updates them regularly ...
or something which goes through the file system, opens each and every file, searches for your string etc. - and that is a hella bad idea performance wise
