戻る      list_header.php     

《PHP言語 /list_header.php》

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>ヘッダ情報の取得</title>
</head>

<body>
<a href="http://shin-sapporo.com/php/day02.html">戻る</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="day02-2.html">ソースファイル</a><hr />

<h1 style="background:#cccccc">ヘッダ情報の取得</h1>
<table border="0">
<?php
$aryHeader=array("HTTP_USER_AGENT","HTTP_ACCEPT_LANGUAGE","HTTP_REFERER");
foreach($aryHeader as $name){
?>
<tr>
<th style="color:#FFffFF;background:#0086b2;width:80pt;">
<?php print($name); ?></th>
<td><?php print($_SERVER[$name]); ?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>