Jump to content
Sign in to follow this  

Winhttp - connect with site

Recommended Posts



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 ()


        $sUser = "testowo"
        $sPass = "test123"
        $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
        $oHTTP.Open("POST", "http://cswwe.xup.pl/login.php/", False)
        $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

GUIDelete ()

;$oHTTP.SetCredentials("testowo", "test123", 0)

Can some1 help me :)?

Sorry for my english

Share this post

Link to post
Share on other sites

Look here.

If that function can't be modified for your need, check out the two links below it for more info on 'POST'.

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.