Results 1 to 8 of 8

Thread: Submit webpage form?

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    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!

    ------------------
    webmaster@hackvp.com
    http://www.hackvp.com
    I may be dumb, but I am not stupid!



  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593

    Post

    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
    john@vb-world.net



  3. #3

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    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


    ------------------
    webmaster@hackvp.com
    http://www.hackvp.com
    I may be dumb, but I am not stupid!



  4. #4
    Guest

    Post

    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.

  5. #5

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    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?

    ------------------
    webmaster@hackvp.com
    http://www.hackvp.com
    I may be dumb, but I am not stupid!



  6. #6
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    593

    Post

    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
    john@vb-world.net



  7. #7

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    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

    ------------------
    webmaster@hackvp.com
    http://www.hackvp.com
    I may be dumb, but I am not stupid!



  8. #8
    New Member
    Join Date
    Apr 2001
    Posts
    12
    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=YourEmail@isp.com&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
  •  



Click Here to Expand Forum to Full Width