Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

48 users online



PHP Statistics

PHP Statistics

Currently viewing this thread: 1 (0 members and 1 guests)


tcbil

tcbil

I hate Customer Services!
Status: Offline!

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!

nertman

nertman

lurker
Status: Offline!

use i believe getenv("HTTP_USER_AGENT"); to get more options or run

$host = gethostbyaddr($ip);

<?php
foreach ($_SERVER as $key => $value){
print "\$_SERVER[$key] = $value<br>\n";
}
?>

Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0076 seconds.