athred Posted February 22, 2011 Share Posted February 22, 2011 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 Link to comment Share on other sites More sharing options...
willichan Posted February 22, 2011 Share Posted February 22, 2011 Look here. If that function can't be modified for your need, check out the two links below it for more info on 'POST'. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now