Results 1 to 5 of 5

Thread: [RESOLVED] Download a webpage from the internet using khttp component?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    24

    Resolved [RESOLVED] Download a webpage from the internet using khttp component?

    How to use khttp component to fetch html document for a https site? Has anyone used it to do that?

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Download a webpage from the internet using khttp component?

    What is khttp?? You can use Inet (Internet Transfer Control) instead:
    VB Code:
    1. Dim source As String
    2.     source = Inet1.OpenURL "http://www.VBForums.com"

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    24

    Re: Download a webpage from the internet using khttp component?

    Quote Originally Posted by gavio
    What is khttp?? You can use Inet (Internet Transfer Control) instead:
    VB Code:
    1. Dim source As String
    2.     source = Inet1.OpenURL "http://www.VBForums.com"
    I think khttp has more features than Inet control. Further, inet control is blocked by many known sites so we cant use it on them. The best thing is it can access https sites ...
    Last edited by sufyaaan; Oct 24th, 2006 at 03:04 PM.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    24

    Re: Download a webpage from the internet using khttp component?

    I am attempting the following code and getting a run-time error '429'

    Activex component can't create object.

    No matter I have regged it on my PC and included a ref to it from the VB.

    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3.     Dim inet As KHTTPLib.inet
    4.     Set inet = CreateObject("KHTTPLib.inet")
    5.      
    6.     inet.openurl ("http://www.yahoo.com/")
    7.    
    8.     Text1.Text = inet.content
    9.    
    10.     Set inet = Nothing
    11.    
    12. End Sub

    Anyone help me out?

  5. #5

    Thread Starter
    Junior Member
    Join Date
    May 2006
    Posts
    24

    Re: Download a webpage from the internet using khttp component?

    I changed the code and its working like anything....


    VB Code:
    1. Private Sub Command1_Click()
    2.  
    3.     Dim inet As New KHTTPLib.inet
    4.      
    5.     inet.openurl ("https://www.sss.com/")
    6.    
    7.     Text1.Text = inet.content
    8.    
    9.     Set inet = Nothing
    10.    
    11. End Sub

    Problem resolved.

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