Implementation of free Counter with ASP-1

Source: Internet
Author: User
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 ">

&LT;TR&GT;&LT;TD align= "left" > User name: <input type= "text" size= "a" name= "name" ></td></tr>

&LT;TR&GT;&LT;TD align= "left" > User password: <input type= "password" size= "a" name= "pass" ></td></tr>

&LT;TR&GT;&LT;TD align= "left" > Homepage name: <input type= "text" size= "a" name= "Homename" ></td></tr>

&LT;TR&GT;&LT;TD align= "Left" > Home address: <input type= "text" size= "" name= "url" ></td> </tr>

&LT;TR&GT;&LT;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



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.