Registering on website through vb6?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Registering on website through vb6?

  1. #1
    Join Date
    Feb 2008
    Posts
    23

    Registering on website through vb6?

    Could someone tell me how to write a program that can register on for example gmail.com?
    I don't have any idea how to "send" the informations(login, password etc) to webpage.
    Examples welcomed.

    Regards,
    danw8

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    If you View Source on the Gmail sign-up page, you'll see that there's an HTML form tag:

    <form action="/accounts/NewAccount?service=mail&amp;continue=http%3A%2F%2Fmail.google.com%2Fmail%2Fe-11-10afb30378f385d8e79e062cee3db81e-c5a2b837c22444759c1a72ae4e2c1e401ad42f3b&amp;type=2" id="gaia_langform" method="POST">

    Within the form, there is a series of <input> tags:

    <input type="hidden" name="type" value="2">
    <input type="text" name="FirstName" value="" id="FirstName" size="30">
    <input type="text" name="LastName" value="" id="LastName" size="30">

    The key to submitting the form programmatically is to send an HTTP POST request to the URL in the "action" attribute of the form tag. The post must contain values for each of the <input> elements within the form. For more information, see this article: http://www.developerfusion.co.uk/show/3272/1/

    Many sites include features to make automated registration difficult or impossible. Gmail, for example, asks the user to type the value of a randomly-generated image containing some distorted text. I don't know of any way to decode that image from a VB app.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Quote Originally Posted by danw8
    Could someone tell me how to write a program that can register on for example gmail.com?
    I don't have any idea how to "send" the informations(login, password etc) to webpage.
    Examples welcomed.

    Regards,
    danw8
    Welcome to DevX

    May I ask why you want to do this?

    As indicated by Phil Weber, many websites go to great lengths to prevent this sort of thing from happening as, typically, this is how spammers register on web sites.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

  4. #4
    Join Date
    Feb 2008
    Posts
    23
    Hello
    Thank you for your replys.

    I totally forgot about the image verification... nevermind, it's not possible to do for me then.
    My friend was looking for a programmer who can do thing like this. I don't think it's for spamming purposes.

    But if I wanted to register (no image verification) how would I do that? Just to learn Examples are welcomed.

  5. #5
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    See the article at the link in my reply above.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  6. #6
    Join Date
    Feb 2008
    Posts
    1

    Thumbs up Solution to mysterious POST in VB6

    Hi there, just seen this message and thought that the following may be helpful. Took forever to find out that i needed to use the "Content-Type: application/x-www-form-urlencoded" parameter.
    Hope that helps :-)
    Stefan

    Private Sub Command1_Click()
    Dim strURL As String
    Dim strFormData As String
    strURL = "http://ws22_stefan/JanTest/WriteStub.asp"
    strFormData = "1=1234567890&2=1234567890&3=1234567890&4=1234567890&5=1234567890&6=1234567890&7=123456789 0&8=1234567890&9=1234567890&10=1234567890&11=1234567890&12=1234567890&13=1234567890&14=123 4567890&15=1234567890&16=1234567890&17=1234567890&18=1234567890&19=1234567890&20=123456789 0"
    Inet1.Execute strURL, "POST", strFormData, "Content-Type: application/x-www-form-urlencoded"
    End Sub

  7. #7
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    That isn't going to do any good if the web site has rules in place blocking automated registration.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Access a website thru another website
    By BhagyaLakshmi in forum ASP.NET
    Replies: 3
    Last Post: 09-20-2007, 11:46 AM
  2. Speaking of strings...
    By Harlow in forum .NET
    Replies: 246
    Last Post: 10-26-2002, 12:30 AM
  3. Replies: 3
    Last Post: 07-21-2001, 02:32 PM
  4. Replies: 3
    Last Post: 03-07-2001, 10:22 PM
  5. Replies: 24
    Last Post: 02-09-2001, 12:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center