Results 1 to 6 of 6

Thread: Visual Basic 6 and HTTPS

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    7

    Question Visual Basic 6 and HTTPS

    Hello my friends!

    How can I connect my VB6 program with a HTTPS website? I am new in VB world and I need this. I need to conect using a user and password and after I need to upload one file to the server.



    Thanks for the help.
    Last edited by tiagonop; Mar 27th, 2008 at 09:25 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Visual Basic 6 and HTTPS

    Welcome to the forums.

    Don't you mean connect to a database on the site? Do you have the proper permissions to make this connection?

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    7

    Re: Visual Basic 6 and HTTPS

    Hack,

    Thanks for the Welcome.
    I think that I will connect to this site by a database, but I want to optimize the follow process the person connect into a site like GMAIL, using a user and a password, but after this the person needs to upload some .txt file. I dont want to connect directly in the database, I want to connect using the password and the user of the https website. Can you understand me? If I am a little confuse ask me again that I explain again...

    Thanks again man.

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Visual Basic 6 and HTTPS

    Press CTRL+T to open the Components dialog. Find "Microsoft Internet Transfer Control" and check the box, click OK, and add the control to your form. It should have a name of Inet1.

    Click the control on your form, then go to the properties window and set the Protocol property to HTTPS.

    Then you can communicate to the server and it will handle the secure connection/encryption/whatever for you.

    There are a lot of threads/tutorials on using the Inet control.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2008
    Posts
    7

    Question Re: Visual Basic 6 and HTTPS

    Man I search the INET component but I search in the internet only things about FTP. I search nothing about HTTPS. Please If you have some example abou HTTPS for VB6 send me, or if you know about I will be very very great. Thanks a lot for the patience.

  6. #6
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Visual Basic 6 and HTTPS

    The code should be the same as it normally is for HTTP, it's just doing everything over a secure connection...

    vb Code:
    1. Dim strHTML As String
    2. strHTML = Inet1.OpenURL("https://www.url.com")
    3. Debug.Print strHTML

    There's also the .Execute method if you want to send a POST request to an HTML form or something. I don't remember the code off-hand, but try:
    http://www.google.com/search?hl=en&s...rm&btnG=Search

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