Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header('Content-Type: text/plain');
- /* _____ _____ _ _____ _____ _____ _____ _____ _____
- ___| | __ |_| _ |_ _|___ ___|_ _| __| _ | |
- |_ -| --| -| | __| | | |- _|___| | | | __| | | | |
- |___|_____|__|__|_|__| |_| |___| |_| |_____|__|__|_|_|_|
- |s C R i P T z - T E A M . i N F O|████████████████████████████
- $file -> in what file to search for $searchfor
- $searchfor -> what to search in $file
- */
- $file = "";
- $searchfor = "";
- $contents = file_get_contents($file);
- $pattern = preg_quote($searchfor, '/');
- $pattern = "/^.*$pattern.*\$/m";
- if (preg_match_all($pattern, $contents, $matches)) {
- echo "Found matches:\n";
- echo implode("\n", $matches[0]);
- } else {
- echo "No matches found";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement