<% Response.Charset="ISO-8859-1" %>
<!--
Autor: FRANCKE PEIXOTO
Msn: francke@xmasters.com.br
Email: ddexterr@gmail.com ou francke.peixoto@qx3.com.br
Tradutor online : http://tradutor.xmasters.com.br
-->
<%
Function BinaryToString(strBinary)
Dim intCount, xBinaryToString
xBinaryToString =""
For intCount = 1 to LenB(strBinary)
xBinaryToString = xBinaryToString & chr(AscB(MidB(strBinary,intCount,1)))
Next
BinaryToString = xBinaryToString
End Function
function pega(p,para)
if Not (p = "") then
Set XMLHttp = Server.CreateObject("MSXML2.XMLHTTP")
XMLHttp.open "GET","http://online.babylon.com/cgi-bin/trans.cgi?layout=uol.txt&lang="¶&"&word="&p&"", false
XMLHttp.send()
pega = BinaryToString(XMLHttp.responseBody) 'ResponseText
pegaa = split(pega,chr(10))
for i = 5 to UBound(pegaa)
pegaa(i) = replace(pegaa(i)," ","")
pegaa(i) = replace(pegaa(i),"""","'")
if i = 5 then pegaa(i) = "<b>"&pegaa(i)&"</b>"
if instr(pegaa(i),"<a href=") > 0 then
exit for
end if
if pegaa(i) <> "" then
ba = ba & replace(pegaa(i),"COLOR='#000000'", "style='border: dashed 1px #dddddd;'")& "<br>"
end if
next
response.write "<div class=resultado>"&ba&"</div>"
end if
end function
%>
<% Call pega( request.QueryString("traducao"),request.QueryString("para")) %>