Today did an ASP counter, release the source code it, quite simple!

Source: Internet
Author: User
Tags count readline
Counter ' the day before yesterday in Johnny's column saw a counter, suddenly remember before I also did ~ ~ Today turned out to change the embedded into my blog ~ ~ Put on someone else's server ~ ~ Release the source code we have to see if you want to look at it ~ ~ If you do not like to use the picture on the change to the text got! Picture file you can find something nice to put on!

' ************************ call *********************
' * <script language= "javascript" src= "Xxx.asp?max=8" ></script>
'*************************************************

javastr= "<div algin= ' center ' >"
<%
Max=request ("Max") '//Counter digit
If request.cookies ("count") = "Then"//anti-brush
Set fso=server.createobject ("Scripting.FileSystemObject")
Set Fp=fso. OpenTextFile (Server.MapPath ("Count.dat")) '//Counter statistics file
COUNTN=FP. Readline
Countn=countn+1
Fp.close
Set fp=nothing
Set Fp=fso.createtextfile (Server.MapPath ("Count.dat"))
Fp. Writeline COUNTN
Set fp=nothing
Set fso=nothing
Response.Cookies ("Count") =countn
End If
Set fso=server.createobject ("Scripting.FileSystemObject")
Set Fp=fso. OpenTextFile (Server.MapPath ("Count.dat"))
S=FP. Readline
For n= (Max-len (s)) to 1 step-1
%>
javastr=javastr+ "<%
Next
J=0
For I= (Max-len (s)) to Max-1
J=j+1
%>
javastr=javastr+ ".gif ' border=0> '"
<%
Next
Set fp=nothing
Set fso=nothing
javastr=javastr+ "</div>"
%>
document.write (JAVASTR)



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.