counter to achieve a free counter, we must prepare a 0-9 of these 10-digit GIF picture, then named 0.gif-9.gif. Create a mesh in the home page directory
Record free, and put the picture file counter.asp,user.html,reg.asp,manage.asp,dele.asp,easpcount.asp in the release directory.
1. Register the user data the document counter.asp
<%response.write "Access Denied!" ": response.end%>
2. User Application procedure: user.html
<body style= "Background-color: #f7f7fb" >
<form name= "FormName" action= "reg.asp" Method=post >
<p align= "center" style= "Font-size:24pt;font-weight:bold;color: #800000" > Counter application </p>
<table border= "0" cellspacing= "0" width= "" style= "" font-size:10pt ">
<TR><TD align= "left" > User name: <input type= "text" size= "a" name= "name" ></td></tr>
<TR><TD align= "left" > User password: <input type= "password" size= "a" name= "pass" ></td></tr>
<TR><TD align= "left" > Homepage name: <input type= "text" size= "a" name= "Homename" ></td></tr>
<TR><TD align= "Left" > Home address: <input type= "text" size= "" name= "url" ></td> </tr>
<TR><TD align= "Left" >
<input type= "Submit" value= "complete" > <input type= "reset" value= "Cancel" >
</td></tr></table></form></body>
3. Processing user Application Procedure Reg.asp
<%
Response.expires=0
Dim input ()
Name = Request.Form ("name")
pass = Request.Form ("Pass")
Homename = Request.Form ("Homename")
url = request.form ("url")
infile = Server.MapPath ("counter.asp")
Set fs = CreateObject ("Scripting.FileSystemObject")
Set thisfile = fs. OpenTextFile (Infile,1,false)
Counter = 0
Do as not thisfile. AtEndOfStream
Thisline = Thisfile.readline
Redim Preserve input (counter)
Input (counter) = Thisline
Counter = counter + 1
Loop
Thisfile. Close
For I=0 to Counter-1
If Name=input (i) Then
Response.Write "<body bgcolor= #f7f7fb ><p> <p align= ' center ' > Sorry, already have this username </p>"
Response.Write "<p align= ' center ' ><a href= ' Javascript:history.go (-1); ' > Click here to modify </a></p></body> "
Response.End
Exit For
End If
Next
Set outfile = fs. CreateTextFile (infile)
OutFile. WriteLine input (0)
OutFile. WriteLine Name
OutFile. WriteLine Pass
OutFile. WriteLine Homename
OutFile. WriteLine URL
OutFile. WriteLine 0
For I=1 to Counter-1
OutFile. WriteLine input (i)
Next
Outfile.close
Set fs=nothing
strs= "<script src=http://gp/wwwroot/free/easpcount.asp?id=" &name& "></script>"
' src ' http://gp/wwwroot/for your home page Space home directory
Response.Write "<body bgcolor= #f7f7fb ><p> <p align= ' center ' ><font style= ' color:red ' > ' & name& "</font> you have already claimed
Please paste the following code into your Web page code </p> "
Response.Write "<p align= ' center ' style= ' color: #800000 ' >" &server.htmlencode (STRs) & "</p>"
Response.End
%>
---------------------------------------------------
Writen by Aspboy and powered by http://easp.126.com