show_src.php

<!DOCTYPE public "-//w3c//dtd html 4.01 transitional//en" 
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <title>Sorgente di "<?php echo $_GET["script"?>"</title>
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>

<?php

    $script 
$_GET["script"];
    if(!
$script) {
        echo 
"<BR><B>ERROR: Script Name needed</B><BR>";
    } else {
        if (
ereg("(\.php|\.inc|\.c)$",$script)) {
            echo 
"<h1 align=\"center\">$script</h1>\n";
            
// sul server sono disattivate le segunti funzioni
            // highlight_file($script) e show_source ($script);
            
$html_script implode (''file ($script));
            
highlight_string ($html_script);
        } else {
            echo 
"<H1>ERROR: Only PHP or include script names are allowed</H1>"
        }
    }

?>

</body>
</html>