当前位置: 首页 > 图文教程 > 网络编程 > ASP > 用Agent+ASP技术制作语音聊天室

ASP
JS复制特定内容到粘贴板
ASP+Access数据库安全设置方法小结
ADSI+ASP添加IP到IIS禁止访问列表中
ASP Google的translate API代码
最小asp后门程序
asp xml 缓存类
asp 过滤尖括号内所有内容的正则代码
ASP去掉字符串头尾连续回车和空格的Function
ASP IE地址栏参数的判断
SQL 注入式攻击的终极防范
ASP也使用ORM,给ASP上所有的SQL注入画上句号
判断Session的过期时间 采用JavaScript实时显示剩余多少秒
asp 动态生成rss(不成生xml文件)代码
ASP XML制作菜单管理程序
asp之自动闭合HTML/ubb标签函数附简单注释
asp 读取文件和保存文件函数代码
asp 随机字符串函数
asp form 表单验证函数
ASP 循环导入导出数据处理 不使用缓存
asp 数据库连接函数代码

用Agent+ASP技术制作语音聊天室


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 217 ::
收藏到网摘: n/a

  用Agent+ASP技术制作语音聊天室
--------------------以下为程序内容,按文章中出现的顺序分块排序

<!--定义"AgentControl"-->
<OBJECT classid=clsid:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F
codeBase=#VERSION=2,0,0,0 id=Agent>
</OBJECT>

<!--定义L&H TruVoice Text-To-Speech American English -->
<OBJECT classid=clsid:B8F2846E-CE36-11D0-AC83-00C04FD97575
codeBase=#VERSION=6,0,0,0 id=TruVoice width="14" height="14">
</OBJECT>
______________________________________________________________

尝试从微软Agent角色目录中装载
Set LoadRequestUNC = Agent.Characters.Load ("Peedy", "Peedy.acs")

  If LoadRequestUNC.Status <> 0 Then
    ' 如果失败便尝试从微软服务器下载
    Set LoadRequestURL = Agent.Characters.Load ("Peedy", "http://agent.microsoft.com/agent2/chars/peedy/peedy.acf")
  Else
    ' 现在产生一个Peedy实例
    Set Peedy = Agent.Characters("Peedy")
  End If
_____________________________________________________________

<HTML>
<BODY>
<h3 align="center"><font color="#0000FF">Welcome to My Chatroom!</font></h3>
<FORM method="POST" action="default.asp">
  <p align="center">Your name please:
  <input type="text" name="txtUsername" size="20">
  <input type="submit" value="OK" name="btnOK"></p>
</FORM>
<p align="center"><a href="download.htm">Click here to go to download page.</a></p>
</BODY>
</HTML>
_______________________________________________________________________

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart
    Application("message")=""     '发言内容
    Application("expression")=""  '表情
    Application("sender")=""      '发言者ID
    Application("globalid")=0     '发言总序号
End Sub
</SCRIPT>
_______________________________________________________________________
<%
  Session("username") = Server.HtmlEncode(Request.Form("txtUsername"))
  Session("personalid")=0
%>
<HTML>
<HEAD>
<TITLE>Welcome to My Chatroom!</TITLE>
</HEAD>
<frameset border=0 frameSpacing=0 cols="98,*" frameBorder=0>
  <frame name="agent" src="agent.asp">
  <frameset rows="196,68,*">
    <frame name="display" src="display.asp">
    <frame name="refresh" src="refresh.asp">
    <frame name="message" src="message.asp">
  </frameset>
</frameset>
<frameset>
</frameset>
</HTML>
________________________________________________________________

<HTML>
<BODY BGCOLOR="#006699" TEXT="#FFFFFF">
<!--定义"AgentControl"-->
<OBJECT classid=clsid:D45FD31B-5C6E-11D1-9EC1-00C04FD7081F
codeBase=#VERSION=2,0,0,0 id=Agent>
</OBJECT>
<!--定义L&H TruVoice Text-To-Speech American English -->
<OBJECT classid=clsid:B8F2846E-CE36-11D0-AC83-00C04FD97575
codeBase=#VERSION=6,0,0,0 id=TruVoice width="14" height="14">
</OBJECT>

<SCRIPT language=VB