Jump to content

Need help with _WinHttpSimpleFormFill


Herb191
 Share

Recommended Posts

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)
Link to comment
Share on other sites

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". :D

Edited by Herb191
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...