网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > ASP实例
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
网络编程:ASP教程,ASP.NET教程,PHP教程,JSP教程,C#教程,数据库,XML教程,Ajax,Java,Perl,Shell,VB教程,Delphi,C/C++教程,软件工程,J2EE/J2ME,移动开发
本月文章推荐
.用Web页面执行客户端程序.
.初探SSI网页制作.
.深入讲解 ASP+ 验证(四).
.无组件文件上传代码实例.
.一个BBS的源代码(三).
.不用防火墙自动对付CC攻击.
.Javascript+HTML仿造VB里的Month.
.简单ASP论坛DIY.
.ASP实现多域名同一空间的处理实例.
.用ASP统计用户在站点的停留时间(.
.用ASP、VB和XML建立互联网应用程.
.filesystemobject组件的用法示例.
.网络精英计数器源程序.
.ASP环境下邮件列表功能的实现 (.
.通过事例学习.net的WebForms技术.
.asp生成excel报表.
.关于客户端用ASP参生报表.
.完整的访问统计程序(二 &n.
.怎样做自己的二级域名(之二).
.利用ASP存取各种常用类型数据库(.

XMLHTTP+Javascript+Asp写得聊天室,无刷新实现(四)

发表日期:2001-9-17


########say.asp##############

<% Option Explicit
dim F,T,sC,cL,E,W,sJ
Response.ContentType="text/xml"
F=Request.Form ("F")
T=Request.Form ("T")
sC=Request.Form ("sC")
cL=Request.Form ("cL")
E=Request.Form("E")
'W=Request.Form("W")
W="0"
'发言时间
sJ=getTime()
if Request.ServerVariables("REQUEST_METHOD")="POST" then
sC="<F>"&trim(F)&"</F><T>"&trim(T)&"</T><E>"&E&"</E><sC>"&trim(sC)&"</sC><cL>"&trim(cL)&"</cL><sJ>"&sJ&"</sJ>"
else
Response.End
end if
dim c_info,c_Lid,c_Ip,u_Lid,NewLid,u_name,i
Application.Lock
c_info=Application("c_info")
c_Lid=Application("c_Lid")+1
Application("c_Lid")=c_Lid
c_Ip=(c_info(0)+6) mod 240
c_info(0)=c_Ip
c_info(c_Ip)=c_Lid
c_info(c_Ip+1)=F
c_info(c_Ip+2)=T
c_info(c_Ip+3)=W
c_info(c_Ip+4)=""
c_info(c_Ip+5)=sC '"<F>"&trim(F)&"</F><T>"&trim(T)&"</T><E>"&E&"</E><sC>"&trim(sC)&"</sC><cL>"&trim(cL)&"</cL><sJ>"&sJ&"</sJ>"
Application("c_info")=c_info
Application.UnLock
u_Lid=session("u_Lid")
newLid=u_Lid
u_name=session("u_name")
'&Application("c_Lid")&"%"&c_info(0)

Response.Write "<?xml version=""1.0""?><Msg>"
for i=c_info(0)+6 to 240 step 6
if (c_info(i)>u_Lid) and ((c_info(i+1)=u_name) or (c_info(i+2)=u_name) or (c_info(i+2)="大家") or (c_info(i+3)="0")) then
Response.Write c_info(i+5)
if (newLid<c_info(i)) then newLid=c_info(i)
end if
next
for i=1 to c_info(0) step 6
if (c_info(i)>u_Lid) and ((c_info(i+1)=u_name) or (c_info(i+2)=u_name) or (c_info(i+2)="大家") or (c_info(i+3)="0")) then
Response.Write c_info(i+5)
if (newLid<c_info(i)) then newLid=c_info(i)
end if
next

Response.Write "</Msg>"
session("u_Lid")=newLid

function getTime()
dim y,m,d,h,n,s
y=Year(date())
m=Month(date())
d=Day(date())
h=Hour(time())
n=Minute(time())
s=Second(time()) '当为是一位的 时候在前面加0
if len(m)=1 then m="0" & m
if len(d)=1 then d="0" & d
if len(h)=1 then h="0" & h
if len(n)=1 then n="0" & n
if len(s)=1 then s="0" & s
getTime=y&"/"&m&"/"&d &" " & h&":"& n&":"&s
end function%>



上一篇:XMLHTTP+Javascript+Asp写得聊天室,无刷新实现(三) 人气:15719
下一篇:XMLHTTP+Javascript+Asp写得聊天室,无刷新实现(五) 人气:14194
浏览全部XMLHTTP+Javascript+Asp写得聊天室,无刷新实现的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐