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!
Printable View
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!
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]
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!
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.
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!
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]
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!
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