Important alert: (current site time 7/15/2013 10:28:20 PM EDT)
 

VB icon

A Very Simple Stat-Page v1.2

Email
Submitted on: 4/19/2002 2:13:06 PM
By: JSBeckerist  
Level: Beginner
User Rating: By 4 Users
Compatibility: ASP (Active Server Pages), HTML
Views: 18287
(About the author)
 
     Shows various statistics regarding the user and the server, all on one page. *Updated to show many more Server Variables*
 
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
'**************************************
' for :A Very Simple Stat-Page v1.2
'**************************************
(c) Beckerist.com 2002, This code can be manipulated/edited/used in any way you want, with no reference to me, (but if you would like to I wouldn't mind! :)
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: A Very Simple Stat-Page v1.2
' Description:Shows various statistics regarding the user and the server, all on one page. *Updated to show many more Server Variables*
' By: JSBeckerist
'
' Assumes:This can give out things like IP addresses, just be careful.
'
' Side Effects:Trying to work on a Active Users/Active Registered Users script to incorporate into this (but I want to build it myself!). Suggestions welcome :). This is just the beginning...
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=7458&lngWId=4'for details.'**************************************

<%
counter = 1 '(your counter variable, I will have a simple counter up soon)
datenow=date()
timenow=time()
lastupdated="(4/19/2002)" '(Insert start date here!)
dnow=cdate(datenow)
dupdated=cdate(lastupdated)
hpd=counter/(dnow-dupdated)
%>
<center>
Yourdomain.com Statistics
<table border="0" width="100%">
<TR>
<TD>Home Page Hits (since <%=lastupdated%>): </TD>
<td><%=counter%></TD>
</TR>
<TR>
<TD>Current Time:</TD>
<TD><%=timenow%></TD>
</TR>
<TR>
<TD>Current Date:</TD>
<TD><%=datenow%></TD>
</TR>
<TR>
<TD>Average Hits per day:</TD>
<TD><%=Mid(hpd, 1, 5)%></TD>
</TR>
<TR>
<TD>ALL_HTTP:</TD>
<TD><%=Request.ServerVariables("ALL_HTTP")%></TD>
</TR>
<TR>
<TD>ALL_RAW:</TD>
<TD><%=Request.ServerVariables("ALL_RAW")%></TD>
</TR>
<TR>
<TD>APPL_MD_PATH:</TD>
<TD><%=Request.ServerVariables("APPL_MD_PATH")%></TD>
</TR>
<TR>
<TD>APPL_PHYSICAL_PATH:</TD>
<TD><%=Request.ServerVariables("APPL_PHYSICAL_PATH")%></TD>
</TR>
<TR>
<TD>AUTH_PASSWORD:</TD>
<TD><%=Request.ServerVariables("AUTH_PASSWORD")%></TD>
</TR>
<TR>
<TD>AUTH_TYPE:</TD>
<TD><%=Request.ServerVariables("AUTH_TYPE")%></TD>
</TR>
<TR>
<TD>AUTH_USER:</TD>
<TD><%=Request.ServerVariables("AUTH_USER")%></TD>
</TR>
<TR>
<TD>CERT_COOKIE:</TD>
<TD><%=Request.ServerVariables("CERT_COOKIE")%></TD>
</TR>
<TR>
<TD>CERT_FLAGS:</TD>
<TD><%=Request.ServerVariables("CERT_FLAGS")%></TD>
</TR>
<TR>
<TD>CERT_ISSUER:</TD>
<TD><%=Request.ServerVariables("CERT_ISSUER")%></TD>
</TR>
<TR>
<TD>CERT_KEYSIZE:</TD>
<TD><%=Request.ServerVariables("CERT_KEYSIZE")%></TD>
</TR>
<TR>
<TD>CERT_SECRETKEYSIZE:</TD>
<TD><%=Request.ServerVariables("CERT_SECRETKEYSIZE")%></TD>
</TR>
<TR>
<TD>CERT_SERIALNUMBER:</TD>
<TD><%=Request.ServerVariables("CERT_SERIALNUMBER")%></TD>
</TR>
<TR>
<TD>CERT_SERVER_ISSUER:</TD>
<TD><%=Request.ServerVariables("CERT_SERVER_ISSUER")%></TD>
</TR>
<TR>
<TD>CERT_SERVER_SUBJECT:</TD>
<TD><%=Request.ServerVariables("CERT_SERVER_SUBJECT")%></TD>
</TR>
<TR>
<TD>CERT_SUBJECT:</TD>
<TD><%=Request.ServerVariables("CERT_SUBJECT")%></TD>
</TR>
<TR>
<TD>CONTENT_LENGTH:</TD>
<TD><%=Request.ServerVariables("CONTENT_LENGTH")%></TD>
</TR>
<TR>
<TD>CONTENT_TYPE:</TD>
<TD><%=Request.ServerVariables("CONTENT_TYPE")%></TD>
</TR>
<TR>
<TD>GATEWAY_INTERFACE:</TD>
<TD><%=Request.ServerVariables("GATEWAY_INTERFACE")%></TD>
</TR>
<TR>
<TD>HTTPS:</TD>
<TD><%=Request.ServerVariables("HTTPS")%></TD>
</TR>
<TR>
<TD>HTTPS_KEYSIZE:</TD>
<TD><%=Request.ServerVariables("HTTPS_KEYSIZE")%></TD>
</TR>
<TR>
<TD>HTTPS_SECRETKEYSIZE:</TD>
<TD><%=Request.ServerVariables("HTTPS_SECRETKEYSIZE")%></TD>
</TR>
<TR>
<TD>HTTPS_SERVER_ISSUER:</TD>
<TD><%=Request.ServerVariables("HTTPS_SERVER_ISSUER")%></TD>
</TR>
<TR>
<TD>HTTPS_SERVER_SUBJECT:</TD>
<TD><%=Request.ServerVariables("HTTPS_SERVER_SUBJECT")%></TD>
</TR>
<TR>
<TD>INSTANCE_ID:</TD>
<TD><%=Request.ServerVariables("INSTANCE_ID")%></TD>
</TR>
<TR>
<TD>INSTANCE_META_PATH:</TD>
<TD><%=Request.ServerVariables("INSTANCE_META_PATH")%></TD>
</TR>
<TR>
<TD>LOCAL_ADDR:</TD>
<TD><%=Request.ServerVariables("LOCAL_ADDR")%></TD>
</TR>
<TR>
<TD>LOGON_USER:</TD>
<TD><%=Request.ServerVariables("LOGON_USER")%></TD>
</TR>
<TR>
<TD>PATH_INFO:</TD>
<TD><%=Request.ServerVariables("PATH_INFO")%></TD>
</TR>
<TR>
<TD>PATH_TRANSLATED:</TD>
<TD><%=Request.ServerVariables("PATH_TRANSLATED")%></TD>
</TR>
<TR>
<TD>QUERY_STRING:</TD>
<TD><%=Request.ServerVariables("QUERY_STRING")%></TD>
</TR>
<TR>
<TD>REMOTE_ADDR:</TD>
<TD><%=Request.ServerVariables("REMOTE_ADDR")%></TD>
</TR>
<TR>
<TD>REMOTE_HOST:</TD>
<TD><%=Request.ServerVariables("REMOTE_HOST")%></TD>
</TR>
<TR>
<TD>REMOTE_USER:</TD>
<TD><%=Request.ServerVariables("REMOTE_USER")%></TD>
</TR>
<TR>
<TD>REQUEST_METHOD:</TD>
<TD><%=Request.ServerVariables("REQUEST_METHOD")%></TD>
</TR>
<TR>
<TD>SCRIPT_NAME:</TD>
<TD><%=Request.ServerVariables("SCRIPT_NAME")%></TD>
</TR>
<TR>
<TD>SERVER_NAME:</TD>
<TD><%=Request.ServerVariables("SERVER_NAME")%></TD>
</TR>
<TR>
<TD>SERVER_PORT:</TD>
<TD><%=Request.ServerVariables("SERVER_PORT")%></TD>
</TR>
<TR>
<TD>SERVER_PORT_SECURE:</TD>
<TD><%=Request.ServerVariables("SERVER_PORT_SECURE")%></TD>
</TR>
<TR>
<TD>SERVER_PROTOCOL:</TD>
<TD><%=Request.ServerVariables("SERVER_PROTOCOL")%></TD>
</TR>
<TR>
<TD>SERVER_SOFTWARE:</TD>
<TD><%=Request.ServerVariables("SERVER_SOFTWARE")%></TD>
</TR>
<TR>
<TD>URL:</TD>
<TD><%=Request.ServerVariables("URL")%></TD>
</TR>
<TR>
<TD>HTTP_ACCEPT:</TD>
<TD><%=Request.ServerVariables("HTTP_ACCEPT")%></TD>
</TR>
<TR>
<TD>HTTP_ACCEPT_LANGUAGE:</TD>
<TD><%=Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")%></TD>
</TR>
<TR>
<TD>HTTP_CONNECTION:</TD>
<TD><%=Request.ServerVariables("HTTP_CONNECTION")%></TD>
</TR>
<TR>
<TD>HTTP_HOST:</TD>
<TD><%=Request.ServerVariables("HTTP_HOST")%></TD>
</TR>
<TR>
<TD>HTTP_USER_AGENT:</TD>
<TD><%=Request.ServerVariables("HTTP_USER_AGENT")%></TD>
</TR>
<TR>
<TD>HTTP_COOKIE:</TD>
<TD><%=Request.ServerVariables("HTTP_COOKIE")%></TD>
</TR>
 
 </table>
</html>


Other 7 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments
5/13/2004 6:10:22 PM

when i copied and pasted the script above into the server... i get the error...
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'cdate'

/khiemtest9/stat/test1.asp, line 7

(If this comment was disrespectful, please report it.)

 
11/7/2008 12:28:59 PMViktor Balint

By replacing line:

lastupdated="(4/19/2002)"

to

lastupdated="4/19/2002"
(If this comment was disrespectful, please report it.)

 
11/7/2008 12:29:53 PMViktor Balint

And Good job!!! 5 globes
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.