This script will allow you to scan files of your website and search for a specific pattern; f.i. a word or a sentence.
Table of Contents
Just copy the
php_grep.php script in the root folder of your website. Use your FTP client to do this.
- Get a raw version of the script : click on the raw button or go to this URL : https://raw.githubusercontent.com/cavo789/php_grep/master/php_grep.php
- On your computer, start a text editor like Notepad or Notepad++ and copy/paste there the code
- Save the file (if you're using Notepad++, check in the Encoding menu that you've selected UTF8 NoBom as encoding)
- Put the saved file in your website root folder
Start a browser and run the file i.e go to f.i. http://site/php_grep.php.
The script display a form that will allow you to finetune the folder to scan. You'll also be invited to enter the search pattern you want to scan.
Don't forget to remove the script once you've finished with it.
Christophe Avonture | https://www.avonture.be Based on the work of @cafewebmaster.com and of Bernhard Waldbrunner, PHP grep, Copyright (C) 2012
Thank you to Loïc Martin (lomart) who has mentionned this script on the French Joomla.fr forum (https://forum.joomla.fr/showthread.php?221466-Comment-faire-une-recherche-dans-plusieurs-fichiers-php#post1132581)