Darknet Lantern

Sensitive Search:


Sensitive ON " . $sensitive . "

"; $sensitive=1; }else{ $sensitive=0; //echo "

Sensitive OFF " . $sensitive . "

"; } $query = $_GET['query']; // gets value sent over search form $min_length = 1; $max_length = 32; $instance= $_SERVER['SERVER_NAME']; $participantpath="participants/" . $instance . '/'; $verifiedcsvpath="participants/" . $instance . '/verified.csv'; $unverifiedcsvpath="participants/" . $instance . '/unverified.csv'; if(strlen($query) >= $min_length and strlen($query) <= $max_length){ // if query length is more or equal minimum length then $query = htmlspecialchars($query); // removes the risky characters // there needs to be regex checking, only allow [a-zA-Z0-9.:/] $query=preg_replace("/[^a-zA-Z0-9:\/.\ ]/", "", $query); echo "

Search results for " . $query . " :

"; echo nl2br("\n"); echo nl2br("\n"); //echo $verifiedcsvpath; //echo nl2br("\n"); //echo $unverifiedcsvpath; echo "

Verified Links:

"; echo nl2br("\n"); DisplayCSVNEW($verifiedcsvpath,$query,$sensitive); echo "


Unverified Links:

"; echo nl2br("\n"); DisplayCSVNEW($unverifiedcsvpath,$query,$sensitive); // display the results of verified.csv // only display the results of verified.csv that matches with the search term // display the results of unverified.csv // only display the results of unverified.csv that matches with the search term } else{ // if query length is less than minimum or more than maximum echo '

Search query must be between '.$min_length . " and ".$max_length . " characters.

"; // TODO list the available categories } ?>