Results 1 to 11 of 11

Thread: [RESOLVED] Grab Links from Webpage

Threaded View

  1. #7
    Fanatic Member FireXtol's Avatar
    Join Date
    Apr 2010
    Posts
    874

    Re: Grab Links from Webpage/HTML source

    vb Code:
    1. Dim X As Long, Y As Long
    2. Dim sHtml As String
    3. sHtml = LCase$(Text1.Text) 'cast to lower case
    4.  
    5. X = InStr(sHtml, "[img]")
    6. Do While X
    7.   X = X + Len("[img]")
    8.   Y = InStr(X, sHtml, "[")
    9.   If X > 0 And Y > 0 Then
    10.     Debug.Print Mid$(sHtml, X, Y - X)
    11.   Else
    12.     Exit Do
    13.   End If
    14.   X = InStr(Y, sHtml, "[img]")
    15. Loop
    16.  
    17. 'returns
    18. 'http://images.com/thumbs/atob3iji.jpg
    19. 'http://images.com/images/atob3iji.jpg

    Bon Appétit!

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