|
-
Aug 6th, 2000, 12:03 AM
#1
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.
-
Aug 6th, 2000, 12:39 AM
#2
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
-
Aug 6th, 2000, 12:52 AM
#3
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]
-
Aug 6th, 2000, 12:57 AM
#4
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
-
Aug 6th, 2000, 01:01 AM
#5
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.
-
Aug 6th, 2000, 02:49 AM
#6
Fanatic Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|