Jump to content

Recommended Posts

Posted

Hello,

I need your help with winhttp. I would like to connect with forum, and login. I used Live HTTP headers and I found

POST /login.php username=testowo&password=test123&redirect=&login=Zaloguj
while I send username&password.

I've created test account

username: testowo

password: test123

Here's my code

#include "WinHttp.au3"
#include "GUIConstants.au3"
GUICreate ( "gui", 640, 480 )
$GUIEdit=GUICtrlCreateEdit ( "HTTP Source :" & @CRLF, 10, 10 , 600 , 400 )
GUISetState ()

$URL="http://cswwe.xup.pl/index.php"

        $sUser = "testowo"
        $sPass = "test123"
        $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
        $oHTTP.Open("POST", "http://cswwe.xup.pl/login.php/", False)
        $oHTTP.Send("username=testowo&password=test123&redirect=&login=Zaloguj")
        $oHTTP.Send()
        $HTMLSource = $oHTTP.Responsetext


        GUICtrlSetData ( $GUIEdit, "HTML source of " & $URL & " is:" & @CRLF & @CRLF & StringAddCR($HTMLSource) , "append" )


While 1
   $msg = GUIGetMsg()
   If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

GUIDelete ()

;username=testowo&password=test123&redirect=&login=Zaloguj 
;$oHTTP.SetCredentials("testowo", "test123", 0)

Can some1 help me :)?

Sorry for my english

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
×
×
  • Create New...