代码示例

四川快乐12一定牛 www.njs5.cn 四川快乐12一定牛asp代码示例  在线技术支持

					 
	<%
	Function BytesToBstr(body,code) 
	dim objstream
	set objstream = Server.CreateObject("adodb.stream") 
	objstream.Type = 1 
	objstream.Mode =3 
	objstream.Open 
	objstream.Write body 
	objstream.Position = 0 
	objstream.Type = 2 
	objstream.Charset =code
	BytesToBstr = objstream.ReadText 
	objstream.Close 
	set objstream = nothing 
	End Function
	%>

	<%
	'response.ContentType="text/xml;charset=UTF-8'
	%>
	
<% Function UrlEncoding(DataStr) Dim StrReturn,Si,ThisChr,InnerCode,Hight8,Low8 StrReturn = "" For Si = 1 To Len(DataStr) ThisChr = Mid(DataStr,Si,1) If Abs(Asc(ThisChr)) < &HFF Then StrReturn = StrReturn & ThisChr Else InnerCode = Asc(ThisChr) If InnerCode < 0 Then InnerCode = InnerCode + &H10000 End If Hight8 = (InnerCode And &HFF00)\ &HFF Low8 = InnerCode And &HFF StrReturn = StrReturn & "%" & Hex(Hight8) & "%" & Hex(Low8) End If Next UrlEncoding = StrReturn End Function Function GetSeed() timeStr=now() GetSeed=cstr(Year(timeStr))+cstr(Month(timeStr)) +cstr(Day(timeStr))+cstr(hour(timeStr))+cstr(Minute(timeStr))+cstr(Second(timeStr)) End Function %> <% '发送短信' 'accName 用户名' 'accPwd 密码' 'aimcodes 电话' 'content 内容' 'seed 当前时间 格式:YYYYMMDD HHMISS 例如:20130806102030' 'sign 签名' %> <% accName="用户名" accPwd="密码" sign="签名" Function SendSms(mobiles,content) seed=GetSeed() password=UCase(md5(UCase(md5(accPwd)+seed))) url="accName="+accName+"&accPwd="+password+"&aimcodes="+mobiles+"&content="+content+sign+"&seed="+seed Set HttpReq = Server.CreateObject("Microsoft.XMLHTTP") HttpReq.open "post", "//sdk.lx198.com/sdk/send2", False,"","" HttpReq.setRequestHeader "Content-Length",len(url) HttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8" url=URLEncoding(url) HttpReq.send(url) str=HttpReq.responseText response.Write str End Function <% '查询回执报告' 'accName 用户名' 'accPwd 密码' 'seed 当前时间 格式:YYYYMMDD HHMISS 例如:20130806102030' %> Function qryReport() seed=GetSeed() password=UCase(md5(UCase(md5(accPwd)+seed))) url="accName="+accName+"&accPwd="+password+"&seed="+seed Set HttpReq = Server.CreateObject("Microsoft.XMLHTTP") HttpReq.open "post", "//sdk.lx198.com/sdk/qryReport2", False,"","" HttpReq.setRequestHeader "Content-Length",len(url) HttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8" url=URLEncoding(url) HttpReq.send(url) str=HttpReq.responseText response.Write str End Function <% '查询余额' 'accName 用户名' 'accPwd 密码' 'seed 当前时间 格式:YYYYMMDD HHMISS 例如:20130806102030' %> Function qryBalance() seed=GetSeed() password=UCase(md5(UCase(md5(accPwd)+seed))) url="accName="+accName+"&accPwd="+password+"&seed="+seed Set HttpReq = Server.CreateObject("Microsoft.XMLHTTP") HttpReq.open "post", "//sdk.lx198.com/sdk/qryBalance2", False,"","" HttpReq.setRequestHeader "Content-Length",len(url) HttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8" url=URLEncoding(url) HttpReq.send(url) str=HttpReq.responseText response.Write str End Function <% '查询上行短信' 'accName 用户名' 'accPwd 密码' 'seed 当前时间 格式:YYYYMMDD HHMISS 例如:20130806102030' %> Function receiveSms() seed=GetSeed() password=UCase(md5(UCase(md5(accPwd)+seed))) url="accName="+accName+"&accPwd="+password Set HttpReq = Server.CreateObject("Microsoft.XMLHTTP") HttpReq.open "post", "//sdk.lx198.com/sdk/receiveSms2", False,"","" HttpReq.setRequestHeader "Content-Length",len(url) HttpReq.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8" url=URLEncoding(url) HttpReq.send(url) str=HttpReq.responseText response.Write str End Function SendSms "电话号","测试内容" qryReport qryBalance receiveSms %>
  • 寻找安徒生:想象的翅膀从家乡延展 2019-06-20
  • 乡镇纪委做指导 村务监督更有力 2019-06-20
  • 国资动态--安徽频道--人民网 2019-06-11
  • 广东金林村:农民爱写诗 2019-06-03
  • 公务加油卡私车加油、违规饮酒 池州两干部被处分 2019-05-18
  • 498米!最长地铁站将建成 2019-05-08
  • 是谁让文艺界大腕儿吃盒饭也来开会 2019-05-08
  • 毛泽东说帝国主义都是纸老虎。是有社会基础的 2019-05-07
  • 【学习时刻】国家行政学院经济学部副主任董小君:明方向、抓“龙头”、变思路,推动东北经济企稳向好 2019-04-24
  • 精彩画面—国际摩托车滚雷巡游节 2019-04-24
  • 留得青山在,何愁春不来? 2019-04-22
  • 新时代青年大学生 学习新思想 同上一堂课 2019-04-22
  • 朱鹏当选运城市人民政府市长 2019-04-15
  • 告诉你家掌勺的,9种吃法让营养流失 2019-04-15
  • 早新闻伊能静产女秦昊晒合影 揭高颜值男神女妆惊艳照 2019-04-14
  • 356| 308| 625| 761| 307| 409| 513| 307| 121| 333|