$file=$_REQUEST['file']; // USE: view.php?file=file_you_want_to_view.php function highlight_and_hide ($source) { global $file; $extension=explode(".", $source); $extension = $extension[sizeof($extension)-1]; if ( $extension != "php" && $extension !="inc" && $extension !="htm") { // No PHP, not allowed to see... header("HTTP/1.0 403 Forbidden"); exit(); } if(file_exists($source)) { $t_lines = file($source); // read the file into a string } else { header("HTTP/1.0 404 Not Found"); exit(); } echo '