|
-
Dec 2nd, 2005, 01:00 PM
#1
Thread Starter
New Member
Import Website Source Code into VB5
So I've got VB5 running here, and what I'd like to do is to import the source code of one of my web pages (i.e. the View > Page Source on Firefox) into a text box in my VB program.
Just to make clear, I want something coming up like
HTML Code:
<html>
<title>I can't believe it</title>
<body>
This is a n00b question
</body>
</html>
as opposed to the formatted stuff.
Now I'd like to do this with some nice easy code, and preferable without the use of components (seens as I do a fair bit of VB work on a shared computer where there's generally quite a bit of trouble with components).
I've had a two-hour Googling session and come up with nothing, so if you come up with anything, I'd be most grateful (as you'd expect).
-
Dec 2nd, 2005, 01:22 PM
#2
Re: Import Website Source Code into VB5
Are you using the Webbrowser control? If not, add this control to your form (Microsoft Internet controls) and set its visibility to false.
VB Code:
Webbrowser1.navigate = "www.google.com"
msgbox WebBrowser1.Document.body.innerHTML
Hope this helped
-
Dec 2nd, 2005, 08:14 PM
#3
Re: Import Website Source Code into VB5
You may also use the Microsoft Internet Transfer Control...
VB Code:
Dim str As String
str = Inet1.OpenURL("www.vbforums.com")
MsgBox str
-
Dec 3rd, 2005, 04:21 AM
#4
Thread Starter
New Member
Re: Import Website Source Code into VB5
Well thanks guys for the help: I think dee-u's was more useful seens as VB didn't like the .document.body.innerhtml argument. Anyway, problem sorted and thanks again.
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
|