|
-
Jan 7th, 2000, 12:20 PM
#1
Thread Starter
Member
How would I be abled to have vb fill out a web based form and click the submit button?
prefferebly in my program, not opening up IE. thanks!
------------------
[email protected]
http://www.hackvp.com
I may be dumb, but I am not stupid!
-
Jan 7th, 2000, 05:00 PM
#2
Fanatic Member
Have a look at this article on VB Square. It may be of some use:
http://www.vbsquare.com/articles/cgi/
------------------
John Percival
Editor, VB-World.net
[email protected]
-
Jan 8th, 2000, 01:59 AM
#3
Thread Starter
Member
That was a pretty bad article. Didnt exactly give any code. here is some more info.
I need to be able to fill out this form:
http://www.theglobe.com/registration/default.taf
now, when i view the source the form actions is
I tried sending a variable like:
that just seems to try and submit. how can I pass some variables to the script?
Am I having trouble because it is POST?
Please help 
------------------
[email protected]
http://www.hackvp.com
I may be dumb, but I am not stupid!
-
Jan 8th, 2000, 04:14 AM
#4
Actually I thought is was a pretty good article and it did have code, but apparently not the code you were looking for. Try diving into the WinInet calls, you can use HttpSendRequest to do what you want. Here's the documentation link:
http://msdn.microsoft.com/workshop/n...endRequest.asp
...just need to convert the api's to vb-readable declares.
-
Jan 8th, 2000, 02:28 PM
#5
Thread Starter
Member
I was looking around and I heard that to fill out a POST form, that using winsock should work. Any ideas on how I could do that?
------------------
[email protected]
http://www.hackvp.com
I may be dumb, but I am not stupid!
-
Jan 8th, 2000, 06:35 PM
#6
Fanatic Member
Try something like this. Each variable can be appended to the URL by joining it with the & symbol.
So, looking at the HTML from the page, you would want something like:
http://www.theglobe.com/registration...u&action_defau lt_thankyou=&
etc etc
&globeCentives=1
It will be a long URL, but it should work.
If this does not work, then you will have to look at the MS Internet Transfer Control. It allows POSTing to forms using the execute method.
------------------
John Percival
Editor, VB-World.net
[email protected]
-
Jan 9th, 2000, 12:18 PM
#7
Thread Starter
Member
No, it dows not work, if you read my earlier post it says that it will NOT allow me to do this. Do you have any examples of using the MS Internet Transfer Control execute command to do what I want?
It woud be appreciated. Thanks
------------------
[email protected]
http://www.hackvp.com
I may be dumb, but I am not stupid!
-
Apr 21st, 2001, 06:14 PM
#8
New Member
Here's something that will submit your email address and name to the FreeVBCode newsletter using the Internet Transfer Control.....
Go look at the source to the form at:
www.freevbcode.com/newsletter.asp
Private Sub Command1_Click()
Dim strURL as String, strFormData AsString
strURL = "http://www.freevbcode.com/newsletter.asp?"
strFormData = "Name=YourName&[email protected]&Available=Yes&SendSubscription=Submit"
Inet1.Execute strURL, "POST", strFromData
If you want to pop a browser into it to see what's going on after the data is submitted....add below
WebBrowser1.Navigate Inet1.URL
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
|