PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Sergey Ivanov   Client info   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Client info
Retrieve information about the user browser
Author: By
Last change:
Date: 17 years ago
Size: 1,172 bytes
 

Contents

Class file image Download
<html>
<head>
  <title>Client info class example</title>
</head>

<body bgcolor><br><br><center>

<?php
require "client_info.class.php";
$user_agent=new client_info;

$client_data = $user_agent->parse_user_agent($_GET['uagent'] ? $_GET['uagent'] : $_SERVER['HTTP_USER_AGENT']);
if(!
$client_data['browser'])
  {
$client_data['browser'] = "unknown browser"; }
if(!
$client_data['system'])
  {
$client_data['system'] = "unknown system"; }
  
$client_data['browser_icon'].=".png";
  
$client_data['system_icon'].=".png";
?>
<?
//print $client_data['browser'] . " " . $client_data['browser_version'];
//print $client_data['system'];
?>

<table border=1>
<tr>
 <td><b>Operation System</b></td><td><b>Browser</b></td>
</tr>
<tr>
 <td><? print $client_data['system'];?></td><td><? print $client_data['browser']." ".$client_data['browser_version'];?></td>
</tr>
<tr>
 <td><img src="images/large/icon_<? print $client_data['system_icon'];?>" align="center" alt="system_icon"></td><td><img src="images/large/icon_<? print $client_data['browser_icon'];?>" align="center" alt="browser_icon"></td>
</tr>
</table>
 
 


</center>
</body>
</html>