|
-
Mar 2nd, 2004, 02:43 AM
#1
Thread Starter
Hyperactive Member
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:
Private Sub Command1_Click()
With WB.Document
.getElementById("email").Value = Text1.Text
.getElementById("password").Value = Text2.Text
.getElementById("remember").Value = "1"
.getElementById("submit").Value = "Login"
.getElementById("login_submit").Value = "1"
.Forms(0).Login.Click
End With
End Sub
Private Sub Form_Load()
WB.Navigate "http://www.domain.com"
Do While WB.ReadyState <> READYSTATE_COMPLETE
DoEvents
Loop
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! 
-
Mar 2nd, 2004, 12:01 PM
#2
Thread Starter
Hyperactive Member
*bump*
Born to help others
(If I've been helpful then please rate my post. Thanks)
call me EJ or be slapped! 
-
Mar 2nd, 2004, 06:31 PM
#3
Frenzied Member
Trace the login page with a socket spy app and send that data in winsock...
VB Code:
'pretend this is a button clickie sub...
Winsock1.Connect "www.website.com", 80
End Sub
Winsock1_Connect()
Winsock1.SendData "POST [url]www.website.com/LoginWhatever.php?[/url] HTTP/1.1" & VbCrLf _
& "Host: [url]www.website.com[/url]" & VbCrLf _
& "Content-Length: " & Len(LoginText) & VbCrLf & VbCrLf _
& LoginText
That's just a general example, you need to see how IE logs into the page using a packet watcher.
-
Mar 4th, 2004, 12:58 AM
#4
Thread Starter
Hyperactive Member
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! 
-
Mar 4th, 2004, 05:05 AM
#5
Fanatic Member
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!

-
Mar 4th, 2004, 12:55 PM
#6
Thread Starter
Hyperactive Member
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! 
-
Mar 4th, 2004, 10:42 PM
#7
Thread Starter
Hyperactive Member
*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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|