PHP Statistics
Hello, I am currently working on a stats system for my website, the information i was getting at first was good but now i would like more detail.
Currently the following picks up the info
PHP:<?
if(isset($HTTP_COOKIE_VARS["users_resolution"]))
$screen_res = $HTTP_COOKIE_VARS["users_resolution"];
else //means cookie is not found set it using Javascript
{
?>
<script language="javascript">
<!--
writeCookie();
function writeCookie()
{
var today = new Date();
var the_date = new Date("December 31, 2023");
var the_cookie_date = the_date.toGMTString();
var the_cookie = "users_resolution="+ screen.width +"x"+ screen.height;
var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie
}
//-->
</script>
PHP:<?php
$g_statistics_timedate=date("H:i.s d/m/Y");
$g_statistics_ip=$REMOTE_ADDR;
$g_statistics_referer=$HTTP_REFERER;
$g_statistics_browser=$HTTP_USER_AGENT;
$g_statistics_page=$_SERVER['REQUEST_URI'];
$g_statistics_resolution=$HTTP_COOKIE_VARS["users_resolution"];
?>
Now i would like to know how i can get a break down of "$g_statistics_browser=$HTTP_USER_AGENT;" and also if i can get any more info about the ip, such as the host etc.... Would also be interested in finding out peoples screen color (256,16,32,etc...)
Thanks a million
___________________
PHP Freak Wannabe!
