mrevil
By: a guest | Oct 1st, 2009 | Syntax:
PHP | Size: 0.87 KB | Hits: 329 | Expires: Never
<?
$uhoh[0] = '/<?/';
$uhoh[1] = '/<%/';
$uhoh[2] = '/?>/';
$uhoh[3] = '/%>/';
$phew[0] = '<?';
$phew[1] = '<%';
$phew[2] = '?>';
$phew[3] = '%>';
$source = preg_replace($uhoh, $phew, $source);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
<?if(isset($url)){echo 'View page source of '.urldecode($url);}else{echo'View source of remote files';}?></title>
</head>
<body>
<?php
echo '<form action="'.$PHP_SELF.'" method="get">
<p>
<input type="text" name="url" value="http://yoururlhere/file.htm" />
</p>
</form>';
}
else{
echo $source;
}
?>
</body>
</html>