home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / PageCounter_VBScript.asp < prev    next >
Text File  |  1997-10-25  |  900b  |  44 lines

  1. <%@ Language=VBScript    %>
  2. <%  Option Explicit        %>
  3.  
  4.  
  5. <%
  6.     ' Ensure that this page is not cached
  7.     Response.Expires = 0
  8. %>
  9.  
  10.  
  11. <HTML>
  12.     <HEAD>
  13.         <TITLE>Page Counter</TITLE>
  14.     </HEAD>
  15.  
  16.     <BODY bgcolor="white" topmargin="10" leftmargin="10">
  17.         
  18.         <!-- Display Header -->
  19.  
  20.         <font size="4" face="Arial, Helvetica">
  21.         <b>Page Counter Component</b></font><br>   
  22.  
  23.         <%
  24.             ' Instantiate Page Counter Component    
  25.  
  26.             Dim MyPageCounter
  27.             Set MyPageCounter = Server.CreateObject("MSWC.PageCounter")
  28.  
  29.  
  30.             ' Determine the number of page hits
  31.             
  32.             Dim HitMe
  33.             HitMe = MyPageCounter.Hits("/iissamples/sdk/asp/components/PageCounter_VBScript.asp")
  34.  
  35.  
  36.             ' Output the number of hits to the page
  37.  
  38.             Response.Write "<p>Times visited: " & HitMe
  39.         %>
  40.         
  41.         <p><A href=PageCounter_VBScript.asp> Click here to revisit Page </A>
  42.         
  43.     </BODY>
  44. </HTML>