Results 1 to 7 of 7

Thread: Loggin to a website POST Method and DOM or Inet or Winsock HELP!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2003
    Location
    In Front of my computer...
    Posts
    367

    Unhappy Loggin to a website POST Method and DOM or Inet or Winsock HELP!!

    Hi well what im trying to accomplish is succesfully load to a site that to login requires POST Method here's a little bit of the souce
    -------------------------------------------------------------------------------
    <form method="POST" action="membersarea.php">
    <tr>
    <td width="100%" colspan="2"><font color="#FFFFFF"><b><font size="1" face="Verdana">
    EMAIL:</font></b><br>
    <input type="text" size="17" name="email"></font></td>
    </tr>
    <tr>
    <td width="100%" colspan="2"><font color="#FFFFFF"><b><font face="Verdana" size="1">
    PASSWORD:</font></b><br>
    <input type="password" size="17" name="password"></font></td>
    </tr>
    <tr>
    <td width="100%" colspan="2">
    <input type="checkbox" value="1" name="remember" CHECKED><font size="1"><b>Remember
    Me</b></font>
    </td>
    </tr>
    <tr>
    <td><font size="1" face="Arial Narrow"><a href="lostpass.php">
    Forgot Password?</a></font></td>
    <td><input type="submit" value="Login" name="submit">
    <input type="hidden" value="1" name="login_submit"></td>
    </tr>
    </form>
    ------------------------------------------------------------------------------

    ok i need to login i have tried to do it with the DOM and this is what i got so far

    VB Code:
    1. Private Sub Command1_Click()
    2. With WB.Document
    3. .getElementById("email").Value = Text1.Text
    4. .getElementById("password").Value = Text2.Text
    5. .getElementById("remember").Value = "1"
    6. .getElementById("submit").Value = "Login"
    7. .getElementById("login_submit").Value = "1"
    8. .Forms(0).Login.Click
    9. End With
    10.  
    11. End Sub
    12.  
    13. Private Sub Form_Load()
    14.     WB.Navigate "http://www.domain.com"
    15.     Do While WB.ReadyState <> READYSTATE_COMPLETE
    16.         DoEvents
    17.     Loop
    18. End Sub

    ok i get an error 'object doesnt support this method'
    highlights this line

    .Forms(0).Login.Click

    anyway i can succesfully login to the page Thanks ALOT!!!

    P.S. also there's anyway i can do it with INET control and winsock i would like to learn all of them 3 using POST method... thanks

    regards,

    EJ
    Last edited by EJ12N; Mar 2nd, 2004 at 12:01 PM.
    Born to help others
    (If I've been helpful then please rate my post. Thanks)

    call me EJ or be slapped!

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2003
    Location
    In Front of my computer...
    Posts
    367
    *bump*
    Born to help others
    (If I've been helpful then please rate my post. Thanks)

    call me EJ or be slapped!

  3. #3
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    Trace the login page with a socket spy app and send that data in winsock...
    VB Code:
    1. 'pretend this is a button clickie sub...
    2. Winsock1.Connect "www.website.com", 80
    3. End Sub
    4.  
    5. Winsock1_Connect()
    6.    Winsock1.SendData "POST [url]www.website.com/LoginWhatever.php?[/url] HTTP/1.1" & VbCrLf _
    7. & "Host: [url]www.website.com[/url]" & VbCrLf _
    8. & "Content-Length: " & Len(LoginText) & VbCrLf & VbCrLf _
    9. & LoginText
    That's just a general example, you need to see how IE logs into the page using a packet watcher.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2003
    Location
    In Front of my computer...
    Posts
    367
    hi anyways to do it with inet control ?
    Born to help others
    (If I've been helpful then please rate my post. Thanks)

    call me EJ or be slapped!

  5. #5
    Fanatic Member eimroda's Avatar
    Join Date
    Jul 2000
    Location
    Philippines
    Posts
    642
    Try this:

    Instead of using
    .Forms(0).Login.Click
    try to use
    .Forms(0).Submit.Click

    I guess your Submit buton's name is "submit"... it worked fine with me..
    On Error GoTo Hell

    Hell:
    Kill Me


    Food For Thought:

    - Do not judge a book... if you're not a judge!


  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2003
    Location
    In Front of my computer...
    Posts
    367
    no i got it to work with DOM and the webbrowser (thx thevader) but i would like to know how to do it with Inet control thanks people!
    Born to help others
    (If I've been helpful then please rate my post. Thanks)

    call me EJ or be slapped!

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2003
    Location
    In Front of my computer...
    Posts
    367
    *anyone please*
    Born to help others
    (If I've been helpful then please rate my post. Thanks)

    call me EJ or be slapped!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width