Thanks for your script. I think that I will use the php one (4th in your examples). Just a question on scanning differents directories.
The script says :
if you're replacing the string with the array of strings then you should add the loop to make script go through all the elements of the array.
Here's the modified code from the top of the head (not tested):
Thanks, it's working very well :)