Results 1 to 6 of 6

Thread: inet headers

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 1999
    Posts
    16

    Question

    greetings, is there any way to get just the headers when requesting a webpage from the INET control. i thought i saw a .header but i cant get it to work correctly.. thanks

    Using VB 6 (from Visual Studio)
    ShadowWalker
    webmaster of shadowkeep.com

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jul 1999
    Posts
    16

    NM

    NM, i got the inet1.headers to do what i was looking for =)
    ShadowWalker
    webmaster of shadowkeep.com

  3. #3
    Guest
    You may have found the code, but this may be better .

    Code:
    'Needed: Two textboxes, timer, inet, commandbutton
    'Text1 is the Header box
    'Text2 is the site box
    
    Private Sub Form_Load()
    Timer1.Interval = 2000
    Timer1.Enabled = False
    End Sub
    
    Private Sub Inet1_StateChanged(ByVal State As Integer)
    Select Case State
    Case 3
    Timer1.Enabled = True
    End Select
    End Sub
    
    Private Sub Timer1_Timer()
    Dim h
    If Inet1.StillExecuting = False Then
    h = Inet1.GetHeader
    If Not h = "" Then
    Text1.Text = Text1.Text & h
    Timer1.Enabled = False
    Text2.Enabled = True
    Inet1.Cancel
    End If
    End If
    End Sub
    
    Private Sub CmdGet_Click()
    Screen.MousePointer = 11
    Inet1.Cancel
    Text1.Text = ""
    Inet1.URL = ""
    Inet1.OpenURL Text2.Text, 1
    Text2.Enabled = False
    Screen.MousePointer = 0
    End Sub

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jul 1999
    Posts
    16

    Thanks

    thanks =)
    i basically did the same thing as you. cept i used a richtextbox and parsed it to get the HTML Code.

    my next problem is hte timeout. when im checking a list of urls, and a url times out, my script auto sets the next url in the list to being timed out. what do i need to use to find out when it times out and how do i keep the code from skipping ahead? i have code if you need to see it. i will post it if u need. its messy, and probally wont make sense =)

    till then
    ShadowWalker
    webmaster of shadowkeep.com

  5. #5
    Guest
    I am not exactly sure how to use Inet1.RequestTimeout.

    Code:
    If Inet1.StillExecuting = True Then 'If Inet is still doing a job then...
    'code
    Else
    'skip?
    End If

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jul 1999
    Posts
    16

    Wink timeout

    i have tryed that, but it seems to not work, i alwasy get hte run time error 35761 (Timeout) i cant even get the error handling to work when i get that time out. but i beleave that if statement did help. i tryed it again. though now i dont have a url that times out.
    thanks for ur help =)
    ShadowWalker
    webmaster of shadowkeep.com

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