hmm ok well good idea. I have been messing around with a script that you can view here http://benslayton.awardspace.com/source.php. But that shows the source for the index.php file in that folder.
here is the code if you want to play with it:
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>View Source</title>
<style type="text/css">
body {
background-color: #111111;
font-family: Courier New, Courier, mono;
font-size: 11px;
color: #66CCFF;
}
span {
color: #FFFFFF;
}
.linenumber {
color: #FF9900;
}
em {
color: #666666;
}
h3 {
font-family: Tahoma, Trebuchet MS, Arial;
text-decoration: none;
}
.codelink {
font-family: Tahoma, Trebuchet MS, Arial;
text-decoration: none;
font-size: 10px;
color: #EEEEEE;
}
.codelink:hover {
font-family: Tahoma, Trebuchet MS, Arial;
text-decoration: underline;
font-size: 10px;
color: #66CCFF;
}
</style>
</head>
<body>
<?php
$url = "http://" . $_SERVER[ 'HTTP_HOST' ] . "/" . urldecode( $_GET[ "u" ] );
$lines = file( $url );
?>
<?php
foreach( $lines as $line_num => $line ) {
$line = htmlspecialchars( $line );
$line = str_replace( "<", '<span><', $line );
$line = str_replace( ">", '></span>', $line );
$line = str_replace( "<!--", '<em><!--', $line );
$line = str_replace( "-->", '--></em>', $line );
echo "" . $line . "<br/>\n";
}
?>
</body>
</html>
Edit: oh yeah I would like a form asking for the url and you type in the address and you click sumbit and you can see it.
Bookmarks