[liphp] Sample Code

Colin Taylor [email protected]
Tue, 14 Oct 2003 18:28:51 -0400


Yes, NT 5.0 and 5.1 are Windows XP - it could be XP and XP with Service Pack
1, but I don't know that for certain.

As for screen resolution, I think we discussed this a couple months ago at a
meeting.  We concluded that you'd need Javascript (because that's a
completely client-side property).  But we also noticed that it would only
give you the height and width of the current browser window, so if the user
didn't have his or her browser maximized, you could get some very
interesting results.

I haven't done anything like this before, but it sounds like it could be
useful, so I may end up working with it.  I'll let you know if I have any
great ideas for implementing the Javascript.

Colin Taylor
President, Interstellar Software
www.interstellarsoftware.com

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of
Orrin Edwards
Sent: Tuesday, October 14, 2003 5:40 PM
To: [email protected]
Subject: [liphp] Sample Code


Hello All,

I use this php code on one of my web pages to record the date and
user Agent of the visitor:

 <?php
      $agent = "agent.log";
      $fd1 = fopen($agent, "a");
      $today = getdate();
      $year = $today['year'];
      $month = $today['mon'];
      $day = $today['mday'];
      $hour = $today['hours'];
      $min = $today['minutes'];
      $adata = $_SERVER["HTTP_USER_AGENT"];
      fwrite($fd1, "$year-$month-$day $hour:$min  ");
      fwrite($fd1, "{$adata}\n");
      fclose($fd1);
    ?>

... and the result in the agent.log file is:

2003-10-13 23:42  Mozilla/4.0 (compatible; MSIE 5.5; Windows 98;
(R1 1.3))
2003-10-13 23:58  Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1)
2003-10-14 0:54  Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win
9x 4.90)
2003-10-14 1:28  Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

...which presents the question.. What is NT 5.0 and NT 5.1? Is this
how XP is reported from the user agent?

Also any ideas as to how to include screen resolution in this code
would be appreciated. There apparently is no php code to report
screen resolution.


=====
Orrin - Long Island, New York
http://www.orrin.org/            Site Index
http://www.orrin.org/carib/    Caribbean Index
http://www.orrin.org/syocc/   Syosset Camera Club
http://www.orrin.org/aruba/   Aruba Trip Notes

Linux by SuSE... a world without Windows!
_______________________________________________
Liphp mailing list
[email protected]
https://www.liphp.org/mailman/listinfo/liphp