Jump to content

MSXML how to login to forums?


Recommended Posts

Can anyone teach us how to login autoit forums with autoit and msxml objects please?

Dim $oHttp = _CreateMSXMLObj()
If $oHttp = 0 Then _ErrorMsg("Could not create MSXML object")

$oHttp.Open("POST", $url, False)
$oHttp.setRequestHeader("Content-Type", "multipart/form-data; boundary=" & $boundary)
$oHttp.setRequestHeader("Content-Length", StringLen($body))
$oHttp.Send($body)

Func _CreateMSXMLObj()
    Dim $xmlObj = ObjCreate("Msxml2.XMLHTTP.6.0")
    If IsObj($xmlObj) Then Return $xmlObj

    $xmlObj = ObjCreate("Msxml2.XMLHTTP.3.0")
    If IsObj($xmlObj) Then Return $xmlObj

    $xmlObj = ObjCreate("Msxml2.XMLHTTP")
    If IsObj($xmlObj) Then Return $xmlObj

    $xmlObj = ObjCreate("Microsoft.XMLHTTP")
    If IsObj($xmlObj) Then Return $xmlObj

    Return 0
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...