怎么用ASP写个谷歌自动翻译的功能

钱再多 2010-02-03 10:28:19
从数据库取出数据拿去翻译,翻译完成之后在送回数据库。
...全文
99 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yan11cn 2010-02-04
  • 打赏
  • 举报
回复
楼主试试小偷+字符串获取

<%
Function getHTTPPage(url)
On Error Resume Next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312")
set http=nothing
If Err.number<>0 then
Response.Write "<p align=\'center\'><font color=\'red\'><b>服务器获取文件内容出错</b></font></p>"
Err.Clear
End If
End Function

Function BytesToBstr(body,Cset)
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 = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
%>
街头小贩 2010-02-04
  • 打赏
  • 举报
回复
应该不是你想的哪样!看Lx高手回复

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧