vb XML HTTP

Function GetResult(strURL)
	'posts the captcha answer and returns the pass/fail result
	Dim objXMLHTTP, strResponse, intStatus

	On Error Resume Next
	
	Response.Buffer = True

	Set objXMLHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")

	objXMLHTTP.setTimeouts 5000, 10000, 10000, 10000
	objXMLHTTP.Open "GET", strURL, False
	objXMLHTTP.Send
	intStatus = objXMLHTTP.status

	If err.number <> 0 Or intStatus <> 200 Then
		strResponse = ""
	Else
		strResponse = objXMLHTTP.responseText
	End If

	Set objXMLHTTP = Nothing

	GetResult = strResponse
End Function
Creates an XML HTTP object and retrieves the response of a captcha query - as used on slickcms

Updated: Saturday 9th October 2010, 12:24pm

There are 0 comments

Leave a comment of your own

Comments are currently closed.