Results 1 to 6 of 6

Thread: A question I need answered as soon as possible....

  1. #1
    Guest

    Question

    I am about to start work on a new program that will deal mainly with the internet and extracting information from it. I will need to get the source code from a page and search through it for the info I put in. Now here are my question...

    How do I get the HTML of the page that my web browser is currently at into my program?

    I have never had to deal with getting information from another program, so this is new to me. Please try your hardest to explain how to do this if you know. Thanks.

  2. #2
    Guest
    You could use the MSInet Control (not very reliable though).

    Code:
    Text1.Text = Inet1.OpenURL("http://www.site.com")
    Or you could navigate to it using the ShDocVW.dll Webbrowser Control and get the source from it.

    Code:
    Webbrowser1.Navigate "http://www.site.com"
    Text1.text = Webbrowser1.Document.documentElement.innerHTML

  3. #3
    Guest
    Need more....

    I need to get the address from a browser, like Internet explorer or Netscape.


    [Edited by hellswraith on 08-06-2000 at 01:58 AM]

  4. #4
    Guest
    MSInet is very buggy. Sometimes it gets the whole web page, sometime it only gets half. So it's not very reliable. Whereas the Webbrowser control will get the page, (i think it leaves out the <html><head></html> part, but you don't really need it.)

    Than once you put it in a textbox:

    Code:
    If Instr(Text1, "what your looking for") Then
    Msgbox "Found"
    Else
    Msgbox "Not Found"
    End If

  5. #5
    Guest
    That info will help me, but I need the address that the user will have surfed to using their installed web browser, not my program.

    I edited my above post after I realized what you were trying to tell me.

  6. #6
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    You can use DDE to retrieve the urls, but that involves taking the caption of the window and not going to work great for you. So here is a link to a project that will retrieve all open urls using API's
    Urls Using Api's

    Hope that helps,
    D!m
    Dim

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