Programming "Method Post" |
Author: |
Message: |
michael_m91
Full Member
Posts: 371 Reputation: 1
33 / / –
Joined: Jan 2004
|
O.P. Programming "Method Post"
How do I program (In VB 6.0) to submit data to a website using Method="Post"?
I'm very confused but wan't to try none the less.
|
|
10-03-2004 04:00 AM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Programming "Method Post"
Well you could setup the page to read data and compare it...
index.php?text=this is my text
code: <?
echo $text;
?>
I think you can do this using the WinHTTP library but it would be easier to use a Website Control to just navigate a hidden browser on your form to that page with the text.
This post was edited on 10-03-2004 at 04:05 AM by matty.
|
|
10-03-2004 04:03 AM |
|
|
michael_m91
Full Member
Posts: 371 Reputation: 1
33 / / –
Joined: Jan 2004
|
O.P. RE: Programming "Method Post"
quote: Originally posted by Matty.
navigate a hidden browser on your form
Lol i thought of that but lets say... There is a text box on this hidden browser, how do i tell it to fill it then how do i tell it to click the submit button?
|
|
10-03-2004 04:08 AM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Programming "Method Post"
I THINK its WebBrowser1.Document['textbox'] = "' I THINK, now I cant remember exactly, but its the document part of the object.
|
|
10-03-2004 04:11 AM |
|
|
michael_m91
Full Member
Posts: 371 Reputation: 1
33 / / –
Joined: Jan 2004
|
O.P. RE: Programming "Method Post"
quote: Originally posted by Matty.
I THINK its WebBrowser1.Document['textbox'] = "' I THINK, now I cant remember exactly, but its the document part of the object.
It doesnt work, i get "Object Variable or width variable not set"
I had this line of code:
code: MsgBox WebBrowser1.Document("username")
i did msgbox for debuging
EDIT
now i typed
code: MsgBox WebBrowser1.Document = "username"
it says "FALSE"
This post was edited on 10-03-2004 at 04:41 AM by michael_m91.
|
|
10-03-2004 04:36 AM |
|
|
dotNorma
Veteran Member
Posts: 1745 Reputation: 17
33 / / –
Joined: May 2003
|
RE: Programming "Method Post"
code: Private Sub Web1_DocumentComplete(ByVal pDisp As Object, URL
As Variant)
If (pDisp Is Web1.object) Then
While Web1.Busy
DoEvents
Wend
If URL = "https://gmail.google.com/" Then
If InStr(Web1.Document.documentElement.outerHTML, "A
Google approach to email.") <> 0 Then
Web1.Document.frames(0).Document.All("Email").Value =
"<Your Email>"
Web1.Document.frames(0).Document.All("Passwd").Value
= "<Your Pasword>"
Web1.Document.frames(0).Document.All("null").Click
End If
End If
Exit Sub
End Sub
Here is how to log-in at the gmail page for example.
|
|
10-04-2004 02:15 AM |
|
|
michael_m91
Full Member
Posts: 371 Reputation: 1
33 / / –
Joined: Jan 2004
|
O.P. RE: Programming "Method Post"
Thanks that helped alot but im still getting errors
code: Private Sub Form_Load()
WebBrowser1.Navigate "http://shoutbox.menthix.net/basicsearch.php"
End Sub
Private Sub Webbrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is WebBrowser1.object) Then
While WebBrowser1.Busy
DoEvents
Wend
If URL = "http://shoutbox.menthix.net/basicsearch.php" Then
If InStr(WebBrowser1.Document.documentElement.outerHTML, "Keywords:") <> 0 Then
WebBrowser1.Document.frames(0).Document.All("keywords").Value = "Help"
WebBrowser1.Document.frames(0).Document.All("Username").Value = "michael_m91"
WebBrowser1.Document.frames(0).Document.All("null").Click
End If
End If
End If
Exit Sub
End Sub
Trying to do a Msgplus search
This post was edited on 10-04-2004 at 04:06 AM by michael_m91.
|
|
10-04-2004 03:55 AM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
|
10-04-2004 03:47 PM |
|
|
michael_m91
Full Member
Posts: 371 Reputation: 1
33 / / –
Joined: Jan 2004
|
|
10-04-2004 07:51 PM |
|
|
WDZ
Former Admin
Posts: 7106 Reputation: 107
– / /
Joined: Mar 2002
|
|
10-04-2004 08:00 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|