Jump to content
Sign in to follow this  
soadmania

MSXML how to login to forums?

Recommended Posts

soadmania

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.