<% Dim GUID Dim strPage Dim strForm Dim strQuery Dim ErrorString Dim strResult GUID = "7aa56cea-1708-4c7c-ac5b-98a4aa0683e0" strPage = Request.ServerVariables("SCRIPT_NAME") strForm = "GUID=" & GUID strForm = strForm & "&ScriptName=" & strPage strQuery = Request.QueryString ' --------------------------------------------------------------------------------- If GetrData(strQuery, strForm, strResult, ErrorString) Then Response.Write strResult Else Response.Write ErrorString End If Function GetrData(strQuery, strPost, ByRef strResponse, ByRef strError) Dim xmlHTTP Dim strComp Set xmlHTTP = Nothing On Error Resume Next Set xmlHTTP = Server.CreateObject("WinHttp.WinHttpRequest.5.1") strComp = "" & vbCrLf On Error Resume Next If xmlHTTP Is Nothing Then Set xmlHTTP = Server.CreateObject("WinHttp.WinHttpRequest.5") strComp = "" & vbCrLf End If On Error Resume Next If xmlHTTP Is Nothing Then If TryMSXML(strQuery, strPost, strResponse, strError) Then ' the MSXML function will return the data GetrData = True Else GetrData = False End If Else xmlHTTP.Open "POST", "http://www.interlinkexchange.com/media/function/preview.aspx?" & strQuery, False xmlHTTP.SetRequestHeader "Content-type", "application/x-www-form-urlencoded" xmlHTTP.Send strPost If xmlHTTP.Status <> 200 Then strError = "Error: Status=" & xmlHTTP.Status & " Text=" & xmlHTTP.ResponseText GetrData = False Else strResponse = strComp & xmlHTTP.responseText GetrData = True End If End If End Function Function TryMSXML(strQuery, strPost, ByRef strResponse, ByRef strError) Dim xmlHTTP Set xmlHTTP = Nothing On Error Resume Next Set xmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP") strComp = "" & vbCrLf On Error Resume Next If xmlHTTP Is Nothing Then Set xmlHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP.4.0") strComp = "" & vbCrLf End If On Error Resume Next If xmlHTTP Is Nothing Then Set xmlHTTP = Server.CreateObject("Microsoft.XMLHTTP") strComp = "" & vbCrLf End If On Error Resume Next If xmlHTTP Is Nothing Then strError = "No support for HTTP requests found." TryMSXML = False Else xmlHTTP.open "POST", "http://www.interlinkexchange.com/media/function/preview.aspx?" & strQuery, false xmlHTTP.setRequestHeader "Content-type", "application/x-www-form-urlencoded" xmlHTTP.Send strPost If xmlHTTP.status <> 200 Then ' error! strError = "Error: Status=" & xmlHTTP.status & " Text='" & xmlHTTP.responseText & "'" TryMSXML = False Else strResponse = strComp & xmlHTTP.responseText TryMSXML = True End If Set xmlHTTP = Nothing End If End Function %>