I'm recieving an error when using this code.
anyone tell me where i'm going wrong?
Error:
msxml3.dll (0x80072EFE)
The connection with the server was terminated abnormally
/test/cur.asp, line 11
Code:
Code:
<html>
<head>
</head>
<body>
<%
Private Function convertcurrency(fromcurrency, tocurrency, amount, decimalplace)
url = "http://www.google.com/ig/calculator?hl=en&q=" & amount & "+" & fromcurrency & "+in+" & tocurrency
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""
output = xmlhttp.responseText
set xmlhttp = nothing
output = Split(output,"""")
arrconverted = Split(output(3)," ")
convertcurrency = Round(arrconverted(0),decimalplace)
End Function
response.write(convertcurrency("USD","GBP",1,2))
%>
</body>
</html>