Herb191 Posted November 16, 2011 Posted November 16, 2011 I am trying to use _WinHttpSimpleFormFill to login in to a webpage. This is what I have been trying but it does not return the logged in page content as I expected. #include "WinHttp.au3" $sAddress = "rudraweb.com" $login_page = "program/login.php" $email = "my_email@some_domain.com" $password = "some_password" $hOpen = _WinHttpOpen() $hConnect = _WinHttpConnect($hOpen, $sAddress) $sRead = _WinHttpSimpleFormFill($hConnect, $login_page ,"name:loginFrm", "email", $email , "password", $password) If @error Then MsgBox(0,"","Error") Else MsgBox(0, "", $sRead) EndIf _WinHttpCloseHandle($hOpen) _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($sRead)
trancexx Posted November 16, 2011 Posted November 16, 2011 Can you manually login with that data in your browser? ♡♡♡ . eMyvnE
Herb191 Posted November 16, 2011 Author Posted November 16, 2011 (edited) Can you manually login with that data in your browser?YesEdit:And here is a dummy account you can test it on.Edit 2:Removed dummy account info Edited November 17, 2011 by Herb191
trancexx Posted November 17, 2011 Posted November 17, 2011 (edited) It's a bug in my code. I'm interpreting empty action url wrong.I'll fix it and upload new files if I figure out how to do that LOL.edit: There. Try 1.6.2.5 version. LinkThank you for finding a bug. Edited November 17, 2011 by trancexx ♡♡♡ . eMyvnE
Herb191 Posted November 17, 2011 Author Posted November 17, 2011 (edited) Thank you for finding a bug.Thank you for fixing it and creating this UDF. This is going to be an extremely useful UDF in meany of my projects....Although now that I know there was a bug I feel a lot better about the four hours before I posted that I spent thinking "there is no way this should be this hard". Edited November 17, 2011 by Herb191
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