top
Loading...
網絡精英計數器源程序
使用了imagelib組件!
<%
site_id=Request.QueryString("site_id")
if isempty(site_id) then
Response.End
end if

Set Sistema = CreateObject("Scripting.FileSystemObject")
set ILIB = server.createobject("Overpower.ImageLib")
path=server.MapPath("../保存計數文件的路徑/")
CounterFile=path & "count_"& site_id &".txt"
contagem = 0
if Sistema.FileExists(counterfile) then
Set arquivo = Sistema.GetFile(counterfile)
Set texto = arquivo.OpenAsTextStream(1, -2)
contagem = texto.readline
texto.close
end if
contagem = contagem + 1

Set texto = sistema.CreateTextFile(counterfile, true, false)
texto.writeline contagem
texto.close

texto = contagem
if contagem > 1 then texto = texto
textolen=len(texto)
for i=1 to 8-textolen
texto="0" & texto
next

ILIB.FontColor = "#00ff00" '字體色
ILIB.BrushColor = "#000000" '背景色
'ILIB.FontFace = "Verdana"
'ILIB.FontFace = "Checkers"
ILIB.FontSize = 8
ILIB.FontBold = false
ILIB.width = ILIB.GetTextwidth(texto)+5
ILIB.height = ILIB.GetTextHeight(texto)+5
ILIB.PenColor = "#307C3B" '邊框色
ILIB.Box 1,1,ILIB.WIDTH,ILIB.HEIGHT
ILIB.Textout texto,3,3

ILIB.Textout "",ILIB.width/2 - tamanho/2,10

ILIB.PictureBinaryWrite 2, 0, ""

Set Sistema =nothing
set ILIB =nothing
Set arquivo = nothing
Set texto = nothing
%>
本計數器使用了ImageLib組件,在使用程序前需要先注冊該組件;
假如說你將文件保存為count.asp,然后在與count.asp,然后通過下面代碼引用本計數器:
<img src="path/count.asp?site_yoursite" border=0>

你也可以直接引用本站的計數器程序,代碼如下:

<a href="http://www.chinanetboy.com/" target="_blank" alt="網絡精英"><img
src="http://www.chinanetboy.com/scripts/count.asp?site_id=你的域名" border=0></a>


不過使用之前請發個email給我,免得我在清理的時候將你的數據刪了 :)
計數器程序代碼請看這里http://www.chinanetboy.com/website/read.asp?id=123;

北斗有巢氏 有巢氏北斗