Demo
Tải về View-source.zip (979 bytes) hoặc xem code mã HTML.
Tải về View-source.zip (979 bytes) hoặc xem code mã HTML.
PHP:
<html>
<head>
<title>View Source By Mrkien</title>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/>
</head>
<body>
<?php
echo '<div class="phdr">View Source by DQH và Mrkien</div>'.
'<div class="list2">'.
'<form method="POST" id="view" />'.
'<center>URL: <input type="text" name="url" value="'.($_POST ? $_POST['url'] : 'http://').'" size="15" id="url" /><br>'.
'<input type="submit" name="ok" value="OK" /></center></div>';
if($_POST){
if(!preg_match('#http:\/\/#',$_POST['url'])) $_POST['url'] = 'http://'.$_POST['url'];
$f = @fopen($_POST['url'],'r');
If(!$f) {
echo '<div class="rmenu">Site not found !</div>'; require('../incfiles/end.php'); exit; }
$content = file($_POST['url']);
$out = '';
foreach($content as $s) $out .= $s;
echo '<div class="phdr">View site: <b>'.$_POST['url'].'</b></div>';
if($out)
echo '<div class="list2">'.nl2br(htmlspecialchars($out)).'</div>'; else
echo '<div class="rmenu">Site not found !</div>';
}
?>
<p><small>© 2012, Eviet.Ug</small></p>
</body></html>