Results 1 to 2 of 2

Thread: HTML/Search Question

  1. #1

    Thread Starter
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Post

    Is there a way, i can open a html file, from the internet then search it for a string.

    please help



    ------------------
    david
    Teenage Programmer


  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    I just saw your post:

    Dim strString As String, intI As Integer, intJ As Integer, intFreeFile As Integer


    strString = "String you're looking for"
    intFreeFile = FreeFile
    Open "htmlpage.html" for input As #intFreeFile

    do until EOF(intFreeFile)

    Line Input #intFreeFile, strLine

    inti = instr(strLine, strString)

    'this would give you the location of the string
    if intI <> 0 then
    'this means it's found it so you can do what you wish now
    end if

    loop

    Basically this will open the file, read it line by line into a string and then search that string for the string you want. It will give you the location of that string so you can use mid(strLine, intI) to remove everything past that point. Hope this helps.

    ------------------
    'cos Buzby says so!'

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