VB5 Inet and HTTPS - Please HELP !!! 
Author Message
 VB5 Inet and HTTPS - Please HELP !!!

Please help me to understand how HTTPS works.  I can do this stuff manually
through IE but I want to do it with the VB5 Internet Transfer Control:

1.  Post a password and username to an https site:

        ex: https://www.xyzcorp.com/login.asp

        The login.asp has three inputs on the form (frmLogin):

            txtUserID (type="text")
            txtPassword (type="password"
            I1 (type="image")

2.  Download a file from the site

    ex: https://www.xyzcorp.com/downloads/file.txt

Any sample code would be greatly appreciated.

Many thanks in advance!

Jeff Kanel



Sun, 11 Feb 2001 03:00:00 GMT  
 VB5 Inet and HTTPS - Please HELP !!!
I never had luck with Inet with username and passwords, until I
learned this. You can ask anyone in this group about 2 months ago.
According to the help you need to put the username, and password in
the correct order then go, but if you just put the URL in this way, it
works great.

With Inet1

    c = .OpenURL(, 0)
End With

On Wed, 26 Aug 1998 14:04:18 GMT, "news2.infinet.com"

Quote:

>Please help me to understand how HTTPS works.  I can do this stuff manually
>through IE but I want to do it with the VB5 Internet Transfer Control:

>1.  Post a password and username to an https site:

>        ex: https://www.xyzcorp.com/login.asp

>        The login.asp has three inputs on the form (frmLogin):

>            txtUserID (type="text")
>            txtPassword (type="password"
>            I1 (type="image")

>2.  Download a file from the site

>    ex: https://www.xyzcorp.com/downloads/file.txt

>Any sample code would be greatly appreciated.

>Many thanks in advance!

>Jeff Kanel



Sun, 11 Feb 2001 03:00:00 GMT  
 VB5 Inet and HTTPS - Please HELP !!!

Please look at the help function of vb5 you'll find this there!!



Sun, 11 Feb 2001 03:00:00 GMT  
 VB5 Inet and HTTPS - Please HELP !!!
I have looked at VB5 help and could not see how any examples related to my
problem.  There is no discussion of HTTPS, only HTTP and FTP.  I attempted
to apply the FTP examples to my problem but could never get it to work.

Do you have any more-detailed suggestions or code clips that could help me?

Thanks. - Jeff Kanel

Quote:

>Please look at the help function of vb5 you'll find this there!!



Sun, 11 Feb 2001 03:00:00 GMT  
 VB5 Inet and HTTPS - Please HELP !!!
Hi Jeff,

I cannot help you with the third parameter (image ?).
I can with HTTPS.  Here is how you should do this:

    hInternetSession = InternetOpen(scUserAgent, _
                            INTERNET_OPEN_TYPE_PRECONFIG, _
                            vbNullString, vbNullString, 0)
    If CBool(hInternetSession) Then
        hInternetConnect = InternetConnect(hInternetSession, _
                "www.xyzcorp.com", INTERNET_DEFAULT_HTTPS_PORT, _
                vbNullString, vbNullString, _
                INTERNET_SERVICE_HTTP, 0, 0)
        If hInternetConnect > 0 Then
            hHttpOpenRequest = HttpOpenRequest(hInternetConnect, _
                "GET",
"/downloads/file.txt?txtUserID=whateverID&txtPassword=whateverPassword",
                "HTTP/1.0", vbNullString, 0, _
                INTERNET_FLAG_RELOAD Or INTERNET_FLAG_SECURE Or _
                INTERNET_FLAG_IGNORE_CERT_DATE_INVALID Or _
                INTERNET_FLAG_IGNORE_CERT_CN_INVALID, 0)
            If CBool(hHttpOpenRequest) Then
                If HttpSendRequest(hHttpOpenRequest, vbNullString, 0, 0, 0)
Then
                    bDoLoop = True
                    While bDoLoop
                        sReadBuffer = vbNullString
                        bDoLoop = InternetReadFile(hHttpOpenRequest,
sReadBuffer, Len(sReadBuffer),
                                                   lNumberOfBytesRead)
                        sBuffer = sBuffer & Left$(sReadBuffer,
lNumberOfBytesRead)
                        If Not CBool(lNumberOfBytesRead) Then bDoLoop =
False
                    Wend
                End If
                InternetCloseHandle hHttpOpenRequest
            End If
            InternetCloseHandle hInternetConnect
        End If
    End If

Alex

Quote:

>Please help me to understand how HTTPS works.  I can do this stuff manually
>through IE but I want to do it with the VB5 Internet Transfer Control:

>1.  Post a password and username to an https site:

>        ex: https://www.xyzcorp.com/login.asp

>        The login.asp has three inputs on the form (frmLogin):

>            txtUserID (type="text")
>            txtPassword (type="password"
>            I1 (type="image")

>2.  Download a file from the site

>    ex: https://www.xyzcorp.com/downloads/file.txt

>Any sample code would be greatly appreciated.

>Many thanks in advance!

>Jeff Kanel



Tue, 13 Feb 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VB5 Inet and HTTPS - Please HELP !!!

2. VB5 Inet and HTTPS - Please HELP !!!

3. how to send https: with VB5 inet control - getting unauth entry message back

4. Using HTTPS with the INet control (VB5 + SP3)

5. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

6. Retrieving SSL-secured pages over the HTTPS-Protocol using the INet-Control

7. P{roblems with INET control with HTTPS

8. Problems with INET control with HTTPS

9. Inet control with HTTPS

10. What are the INET bugs - especially with HTTPS?

11. inet openurl with a https web type

12. using inet.openurl with a https

 

 
Powered by phpBB® Forum Software