Environment Tests

L

Lighthater

Guest
I know this may be a very broad question, but can anyone tell me how to create an environment test script? I might not even be calling it by the right name. Here is an example:

http://pci.chadwyck.com/envtest.cgi

A sample script would be ideal, but I will take anything I can get :D

Thanks in advance for any help.
 
Not sure i quite understand
are you after the user info ?
 
Yes, basically. I work in technical support and it is very helpful to know as much about the user as possible. We do an IP based authentication here, so knowing their IP is one thing I would want to capture. Also knowing information like OS, Browser, URL the user came from, etc would be very helpful. The example I posted is very close to what I want to have, but I just don't know who to do this.
 
\o/ <o/ \o_ \o|

Here you go then, i wrote this aaages ago and have found it useful ever since, it gathers user info via PHP and JavaScript...

PHP:
<!-- (c) SPeedY_B --><html><head>
<title>User Info  </title>

<style type="text/css">
BODY {
scrollbar-face-color: #ffffff;
scrollbar-shadow-color: #FFFFFF;
scrollbar-highlight-color: #FFFFFF;
scrollbar-3dlight-color: #4A9FE0;
scrollbar-darkshadow-color: #ffffff;
scrollbar-track-color: #ffffff;
scrollbar-arrow-color: #4A9FE0;
}
</style>
</head><BODY onLoad="window.status='SPeedY_B ²ºº² '; return true;">
<body bgcolor="#FFFFFF" link="#3366FF" vlink="#3366FF" alink="#3366FF">
<font Face="Tahoma" color="#4A9FE0" size="2">
<i>SPeedY_B ²ºº²</i>
<hr color="#4A9FE0">
<div align="center"><font Face="Tahoma" color="#4A9FE0" size="2"><U>User Info</u></div>
<table align=center border=0>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">PHP Info:</td>
 <td></td>
</tr>
<? $ipaddr = getenv("REMOTE_ADDR"); ?>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">IP Adress:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo $ipaddr; ?></td>
</tr><font Face="Tahoma" color="#4A9FE0" size="2">

<?
$what = gethostbyaddr($ipaddr);

?>

<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Host:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo $what; ?></td>

<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Refering Page:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo getenv("HTTP_REFERER"); ?></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Retreival Method:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo getenv("REQUEST_METHOD"); ?></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Browser Accept:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo getenv("HTTP_ACCEPT"); ?></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Server Protocol:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo getenv("SERVER_PROTOCOL"); ?></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Browser Version:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo getenv("HTTP_USER_AGENT"); ?></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Language:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo getenv("HTTP_ACCEPT_LANGUAGE"); ?></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Port:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><?echo getenv("REMOTE_PORT"); ?></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Java Info:</td>
 <td></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Browser:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><Script>document.write(navigator.appName)</script></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Operating System:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><Script>document.write(navigator.platform)</script></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Resolution:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><Script>document.write(screen.width + " x " + screen.height)</script></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Colour Depth:</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><Script>document.write(screen.colorDepth + " bit")</script></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Java Enabled?</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><script language="JavaScript">
        if(navigator.javaEnabled()){document.write("Yup")}
        else{document.write("Nope")}
     </script></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Anti-aliasing ?</td>
 <td><font Face="Tahoma" color="#4A9FE0" size="2"><script language="JavaScript">
        if(window.screen.fontSmoothingEnabled == true){document.write("Yup")}
        else{document.write("Nope")}
     </script></td>
</tr>
<tr>
 <td><font Face="Tahoma" color="#4A9FE0" size="2">Plugins (Netscape):</td>
 <td></td>
</tr>
<font Face="Tahoma" color="#4A9FE0" size="2">
<script language="JavaScript">
 for(i=0; i<navigator.plugins.length; i++){
   document.writeln("<tr>");
   document.writeln("<td colspan=2>" + navigator.plugins[i].name + "</td>");
   document.writeln("</tr>");
 }
</script>
</table>
</BODY></HTML>

Hope its of some help .....
 
Here's an example of what it outputs when i use it via mozilla (yes, the user agnet is fake :) )

User Info
PHP Info:
IP Adress: 127.0.0.1
Host: localhost
Refering Page:
Retreival Method: GET
Browser Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Server Protocol: HTTP/1.1
Browser Version: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
Language: en-us, en;q=0.50
Port: 2355
Java Info:
Browser: Netscape
Operating System: Win32
Resolution: 1600 x 1200
Colour Depth: 32 bit
Java Enabled? Nope
Anti-aliasing ? Nope
Plugins (Netscape):
Mozilla Default Plug-in
Shockwave Flash
Adobe Acrobat
QuickTime Plug-in 6.0.2
QuickTime Plug-in 6.0.2
QuickTime Plug-in 6.0.2
QuickTime Plug-in 6.0.2
QuickTime Plug-in 6.0.2
QuickTime Plug-in 6.0.2
Microsoft (R) DRM
Windows Media Player Plug-in Dynamic Link Library
Microsoft® Windows Media Services
 
Whoa! Speedy, you have definately lived up to your name!
 
heh, its something i had pre-prepared so to speak :D
It was one of the first things i wanted to do when i first started using PHP over html, not that i've ever found any real implementation for it (other than blocking peons access to things :p ) but its always a handy file to have lurking about :D
 
Speedy, Thanks again for this. It was just what I was looking for! Just a few more tweaks/additions and I will be all set! You are King for a day (or longer if you like)!
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back