|
-
Mar 22nd, 2006, 09:27 AM
#1
Thread Starter
Addicted Member
[RESOLVED] INET get local file
Im trying to get a webpage on my Hard Drive. I have tried
VB Code:
sHtml = Inet1.OpenURL("file:///c:\My Files\Web.htm")
but it does not work!
sHTML ends up containing nothing
-
Mar 22nd, 2006, 10:18 AM
#2
Conquistador
Re: INET get local file
what happens if you remove the file:/// portion?
are you trying to view the source, or view the actual page?
if you're trying to get the source, why can't you just open the file for input?
-
Mar 22nd, 2006, 10:22 AM
#3
Thread Starter
Addicted Member
Re: INET get local file
I could open it for input but that would mean I would have to add more code. If possible I want to just use this (as it normally downloads from a webpage.). If I remove the file:/// it says Error: address malformed!
-
Mar 22nd, 2006, 10:31 AM
#4
Conquistador
Re: INET get local file
Doesn't using the inet control make your executable bigger anyway? For the sake of 3 lines of code ->
VB Code:
Open "X" For Input As #1
sHtml = Input(LOF(1), 1)
Close #1
Perhaps try /'s instead of \'s in the address - if you still want to persist with the inet control
-
Mar 22nd, 2006, 10:37 AM
#5
Thread Starter
Addicted Member
Re: INET get local file
Well I will still like to see if i can use it. but if it does not work I will use the Open for input
-
Mar 22nd, 2006, 10:55 AM
#6
Thread Starter
Addicted Member
Re: INET get local file
I also have another reason for using it as it appears to add another return chacter to my lines compared to INET which means I would have to change some of my code to make it work
-
Mar 22nd, 2006, 12:25 PM
#7
Thread Starter
Addicted Member
Re: INET get local file
I have been told that it is not possible to open a local file with INET unless I'm using a Web server app.
Thanks
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
|