<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja">
<head>
<?php
	$url = $_GET['url'];
	$contents = file_get_contents($url);
	if ($_GET['h'] <> '') {
		$height = $_GET['h'];
	} else {
		$height = '100%';
	}
	if ($_GET['fs'] <> '') {
		$fontsize = $_GET['fs'];
	} else {
		$fontsize = '12pt';
	}
?>
<meta http-equiv="Content-Language" content="ja">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="author" content="ok.2nd">
<title><?= $url ?></title>
<style type="text/css">
<!--
* { margin: 0px; padding: 0px; }
h1 { font-size: 140%; font-weight: bold; }
h2 { font-size: 130%; font-weight: bold; }
h3 { font-size: 120%; font-weight: bold; }
h4 { font-size: 110%; font-weight: bold; }
.vertical {
	height: <?= $height ?>;
	writing-mode: tb-rl;	/* テキストを縦書きにする */
}
body {
	margin: 20px;
	font-size: <?= $fontsize ?>;
}
pre {
	overflow: auto;
	white-space: normal;
}
pre {
	white-space: -moz-pre-wrap; /* Mozilla */
	white-space: -pre-wrap;     /* Opera 4-6 */
	white-space: -o-pre-wrap;   /* Opera 7 */
	white-space: pre-wrap;      /* CSS3 */
	word-wrap: break-word;      /* IE 5.5+ */
}
-->
</style>
</head>
<body>
<div class="vertical">
<pre><?= mb_convert_encoding($contents, 'UTF-8', 'SJIS-win, UTF-8, JIS, EUCJP-win, SJIS-win') ?></pre>
</div>
</body>
</html>
