快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

网络精英计数器源程序

使用了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>
返回类别: 教程
上一教程: 一个防止外部数据提交的脚本
下一教程: 留言簿自动发E-MAIL

您可以阅读与"网络精英计数器源程序"相关的教程:
· LINE 的计数器源程序(附源代码)
· LINE 的计数器源程序(附源代码)
· 不能ASP图像组件来生成图像的ASP计数器程序(二)
· 不能ASP图像组件来生成图像的ASP计数器程序(三)
· 网页计数器的程序
    微笑服务 优质保证 索取样品