|
-
Nov 19th, 1999, 03:34 AM
#1
Thread Starter
Lively Member
HI.
I am using a web browser control to access the Internet. It pulls up web pages just fine, but I need to save the HTML source code of the displayed page from my VB project.
Option 1
Does anyone know how to do this using the web browser control?
Option 2
The same thing can be accomplished by right clicking on the web page, selecting View Source and then saving the file. How do I get VB to automate these steps?
Option 3
A way to do this that I haven't thought of yet! (using the Internet Transfer Control is not an option due to security issues.)
Of course, the first option is the better, more efficient choice. I just can't figure out how to do it!
I would appreciate it if someone could shed light (and code..if available) on either of the options above.
Thanks in advance.
Chris
-
Nov 19th, 1999, 09:47 AM
#2
Hyperactive Member
Just a silly idea:
Internet Explorer (the engine behind Web Browser Control) stores the source code in a temporary directory with fancy names (e.g. HK0503BF) located in Windows\Temporary Internet Files\Content.IE5\
Just try finding and saving it!
-
Nov 19th, 1999, 09:20 PM
#3
Thread Starter
Lively Member
Juan Carlos,
Thanks for your reply.
I've been researching getting the source code file from the Temporary Internet Files folder. The problem\concern I have with this method is I have to be sure that I am getting the right file (especially when IE assigns them cryptic names). Since this is going to be a process that cycles through many records, I am worried about the accuracy of this method.
Any more "silly ideas" from you, or anyone else reading this post, are welcome.
Thanks
Chris
------------------
CJ
-
Nov 20th, 1999, 04:35 AM
#4
Hyperactive Member
Hi, Chris:
That silly weird name (QFQ907AH) is for the directory, the file name remains unchanged and it's the same of the page.
For ex. the complete path to this post in my machine is:
windows\temporary internet files\content.ie5\qfq907ah\010743.html
I can find it with Windows Explorer, but I was not able to look for it with DOS Dir 'cause my stupid P 166 hangs up when I try to go to DOS from Windows. I think VB would be able to find it, however.
Good Luck!
-
Nov 20th, 1999, 09:46 PM
#5
Thread Starter
Lively Member
Juan Carlos,
Thanks for your follow-up. I was able to locate the file.
This seems like the only way to access the source code with VB other than using the Internet Transfer Control (which is not an option due to security on the website). I am surprised that the Web Browser Control doesn't have a property that returns the source code sense it obviously has to use the source code to display the web page.
It shouldn't be so hard to do this!
Thanks again for your help.
Chris
------------------
CJ
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
|