帝国软件
  设为首页 加入收藏 关于我们
 
解密帝国网站管理系统
栏 目:
 
您的位置:首页 > 技术文档 > ASP编程
网络精英计数器源程序
作者: 发布时间:2005-03-12 来源:
使用了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;
  
评论】【加入收藏夹】【 】【打印】【关闭
※ 相关链接
 ·域名专题 - 域名解析系统DNS的网  (2005-03-12)
 ·为ASP安装TCP/IP网络通讯协议  (2005-03-12)
 ·窗体和功能性的关系与面向对象网  (2005-03-12)
 ·使用J2EE建立基于XML的网络服务  (2005-03-12)
 ·J2EE 探险者:用于无状态网络的   (2005-03-12)
 ·J2EE 探索:有状态网络的 J2EE 技  (2005-03-12)

   栏目导行
  PHP编程
  ASP编程
  ASP.NET编程
  JAVA编程
   站点最新
·致合作伙伴的欢迎信
·媒体报道
·帝国软件合作伙伴计划协议
·DiscuzX2.5会员整合通行证发布
·帝国CMS 7.0版本功能建议收集
·帝国网站管理系统2012年授权购买说
·PHPWind8.7会员整合通行证发布
·[官方插件]帝国CMS-访问统计插件
·[官方插件]帝国CMS-sitemap插件
·[官方插件]帝国CMS内容页评论AJAX分
   类别最新
·在ASP中使用数据库
·使用ASP脚本技术
·通过启动脚本来感受ASP的力量
·学习使用ASP对象和组件
·解析asp的脚本语言
·初看ASP-针对初学者
·ASP开发10条经验总结
·ASP之对象总结
·ASP与数据库应用(给初学者)
·关于学习ASP和编程的28个观点
 
关于帝国 | 广告服务 | 联系我们 | 程序开发 | 网站地图 | 留言板 帝国网站管理系统