Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2017-07-18 (15 hours ago) ![RSS 2.0 feed](/graphics/phpclasses/rss2.png) | | ![Star](/graphics/phpclasses/star.png) ![Star](/graphics/phpclasses/star.png) ![Star](/graphics/phpclasses/star.png) 70% | | Total: 220 This week: 21 | | All time: 7,797 This week: 35![Up](/graphics/phpclasses/up.png) |
|
Collaborate with this project | | Author |
Description This class can search for files with a given string using grep.
It can take a given string and performs a search using the grep command on files inside a given directory that may contain that string.
The grep command may take custom options, so it may perform searches on directories recursively.
Certain files specified in a class array variable may be ignored and not be returned in the results. Innovation Award
![PHP Programming Innovation award winner PHP Programming Innovation award winner](/award/innovation/winner.png) August 2016
Winner
Prize: SourceGuarding PHP encoder tool |
Searching for the contents of files in PHP is easy. However it can be slow when you need to search for data in many files.
This class provides an alternative that can be faster by using the grep command that is available in most Unix or Linux distributions, so it can search many files at once traversing directories recursively.
Manuel Lemos |
| |
![Picture of Truong Van Phu Picture of Truong Van Phu](/picture/user/1403446.jpg) |
|
Innovation award
![Innovation award](/graphics/phpclasses/innovation-award-logo.png) Nominee: 1x
Winner: 1x |
|
Details
SearchStringInDirectory
PHP Search String In Directory
Searching for the contents of files in PHP is easy. However it can be slow when you need to search for data in many files.
This class provides an alternative that can be faster by using the grep command that is available in most Unix or Linux distributions, so it can search many files at once traversing directories recursively.
How to use
1. Require class: require_once 'SearchStringInDirectory.php';
2. Using: $srch = new SearchStringInDirectory('/path/to/search/folder');
3. Using: $result $srch->search("Search string");
Example code in 'index.php' file.
Thank you !
Donations
I highly appreciate any of your donations.
![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)
|
Demo Search String In Directory![External page](/graphics/phpclasses/external.png) |
|
Open in a separate window
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.