From ab8aa55eddd47e652188dbffeb253df79dcfb7b9 Mon Sep 17 00:00:00 2001 From: Kai Hendry Date: Thu, 25 Sep 2014 14:29:30 +0800 Subject: [PATCH] Search for fixed strings (i.e. disallow regexp) --- grep.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grep.php b/grep.php index 98fbf4e..2ea5053 100644 --- a/grep.php +++ b/grep.php @@ -10,7 +10,7 @@ $QUERY=escapeshellarg($_GET['q']); //fwrite($fp, $_GET['q'] . " : " . $QUERY . "\n"); //fclose($fp); -exec("zgrep -hi $QUERY tweets.txt", $array); +exec("zgrep -Fhi $QUERY tweets.txt", $array); $data = json_encode($array); echo $_GET['jsoncallback'] . '(' . $data . ');'; ?>