Sonni Jensen skrev:
>findes der andre, der kan fortælle mig følgende:
>1. operativsystem
>2. skærm opløsning
>3. browser
>4. hvor bruger kom fra da de kom ind på siden
Her er en testside jeg lavede engang:
<html>
<head><title> Test</title>
</head>
<body>
<? echo "<P>Hello Stranger!</P>"; ?>
<hr>
<?
$user_agent = $_SERVER["HTTP_USER_AGENT"];
$browser = substr($user_agent,0,strpos($user_agent,' ('));
$os = substr($user_agent,strpos($user_agent,' (')+2);
$os = substr($os,0,strpos($os,')'));
$language = substr($user_agent,strpos($user_agent,')')+3);
$ip = $_SERVER["REMOTE_ADDR"];
$port = $_SERVER["REMOTE_PORT"];
$hostname = gethostbyaddr($ip);
print '<table>'.
'<tr><td>User_agent:</td><td>'.$user_agent.'</td></tr>'.
'<tr><td>Remote_addr:</td><td>'.$ip.'</td></tr>'.
'<tr><td>Remote_port:</td><td>'.$port.'</td></tr>'.
'<tr><td> </td></tr>'.
'<tr><td>Os:</td><td>'.$os.'</td></tr>'.
'<tr><td>Language:</td><td>'.$language.'</td></tr>'.
'<tr><td>Browser:</td><td>'.$browser.'</td></tr>'.
'<tr><td>IP:</td><td>'.$ip.'</td></tr>'.
'<tr><td>Port:</td><td>'.$port.'</td></tr>'.
'<tr><td>Hostname:</td><td>'.$hostname.'</td></tr>'.
'</table>';
?>
<hr>
<p>You are apparently running <?= $os; ?> in an <?= $language; ?> version.</p>
<p>You seem to be using the <?= $browser; ?> browser.</p>
<p>You are sending from <?= $ip; ?> on port <?= $port; ?>.</p>
<p>You are sending via host <?= $hostname; ?>.</p>
</body>
</html>
--
Bertel
http://bertel.lundhansen.dk/ FIDUSO:
http://fiduso.dk/