Announcement

Collapse
No announcement yet.

HTTP Submit login problem ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • dvbappx
    replied
    Sloved problem

    usr = Input.GetText("user");
    pass = Input.GetText("pass");

    local tValuesToPass = {};
    tValuesToPass["data[User][username]"] = usr;
    tValuesToPass["data[User][password]"] = pass;

    sUrlLogin = "http://hostname.com/users/login";

    nSubmitMethod = SUBMITWEB_POST;
    nTimeout = 20;
    nPort = 80;
    tAuthData = nil;
    tProxyData = nil;
    sResult = HTTP.Submit(sUrlLogin, tValuesToPass, SUBMITWEB_POST, nTimeout, nPort, tAuthData, tProxyData);

    TextFile.WriteFromString("C:\\MyFile.html", sResult, false);
    File.OpenURL("C:\\MyFile.html", SW_SHOWNORMAL);


    Thanks reteset

    Leave a comment:


  • jassing
    replied
    w/o having a real url to test, I'm only guessing here -- but shouldn't the name be Password?

    Leave a comment:


  • dvbappx
    started a topic HTTP Submit login problem ?

    HTTP Submit login problem ?

    I have a problem on php login, can someone help me on that. Thanks in advance.



    <div class="widget alert alert-info adjusted">
    <i class="cus-exclamation"></i>
    <strong>Please type in your username and password.</strong>
    </div>
    <!-- content goes here -->
    <div id="main-content">

    <form class="form-signin" id="target" method="post">
    <div class="control-group">
    <input type="text" class="input-block-level" autofocus placeholder="Username" name="data[User][username]" value="">
    </div>
    <div class="control-group">
    <input type="password" class="input-block-level" placeholder="Password" name="data[User][password]" value="">
    </div>
    <div class="control-group no-border">
    <div style="text-align: right;">
    <input class="btn btn-primary" type="submit" value="Sign in" id="login-btn">
    </div>
    </div>
    </form>

    </div>
    <!-- end content goes here -->

    </div>
    sUrlLogin = "http://hostname.com/users/login";
    local tValuesToPass = { Username="admin",Password="admin",submit="Sign in"};
    nSubmitMethod = SUBMITWEB_POST;
    nTimeout = 20;
    nPort = 80;
    tAuthData = nil;
    tProxyData = nil;
    sResult = HTTP.Submit(sUrlLogin, tValuesToPass, SUBMITWEB_POST, nTimeout, nPort, tAuthData, tProxyData);

    TextFile.WriteFromString("C:\\MyFile.html", sResult, false);
    File.OpenURL("C:\\MyFile.html", SW_SHOWNORMAL);


    Thanks
Working...
X