我爱Aspx >> Asp.Net >> ASP程序中提供在线文章翻译功能<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%
’on error resume next
’ 如果网速很慢的话,可以调整以下时间。单位秒
Server.ScriptTimeout = 999999
’========================================================
’字符编码函数
’========================================================
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
’取行字符串在另一字符串中的出现位置
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<=0 then Newstring=Len(wstr)
End Function
’替换字符串函数
function ReplaceStr(ori,str1,str2)
ReplaceStr=replace(ori,str1,str2)
end function
’=====================================================
function ReadXML(url,code,start,ends)
set oSend=createobject("Microsoft.XMLHTTP")
SourceCode = oSend.open ("GET",url,false)
oSend.send()
ReadXml=BytesToBstr(oSend.responseBody,code )
if(start="" or ends="") then
else
start=Newstring(ReadXml,start)
ReadXml=mid(ReadXml,start)
Ҷƪл˵?
ASP编程经典例子[05-15]
ASP木马Webshell安全解决办案[05-15]
ASP实用技巧:强制刷新和判断文件..[05-15]
用ASP编程实现网络内容快速查找[05-15]
用ASP编写下载网页中所有资源的程..[05-15]
ASP程序性能测试报告[05-15]
Web服务器上防范基于ASP程序的木..[05-15]
利用ASP木马程序获取管理权限[05-15]
一个ASP木马程序的源代码[05-15]
一个ASP统计制作实例[05-15]
ASP编程经典例子[05-15]
由神秘到简单 教你在网页中添加微..[05-15]
ASP木马Webshell安全解决办案[05-15]
ASP实用技巧:强制刷新和判断文件..[05-15]
IIS HTTP500内部错误解决办法[05-15]
用ASP编程实现网络内容快速查找[05-15]
用ASP编写下载网页中所有资源的程..[05-15]
ASP程序性能测试报告[05-15]
用ISAPIfilter使INC、ASA文件安全[05-15]
Web服务器上防范基于ASP程序的木..[05-15]