Re: VB6 to refresh a website

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



How are you getting the file from the website?

If the file has a consistant location (i.e.
http://whatever.com/somesub/somefile.txt), and assuming it is your website
and there is nothing preventing you from directly accessing the file, you
can use some wininet APIs (InternetOpen, InternetOpenURL, InternetReadFile,
InternetCloseHandle) to download the file directly in your VB app without
using a web browser. The downloadable API-Guide at
http://allapi.mentalis.org/agnet/apiguide.shtml has an example.

Or you can use the URLDownloadToFile API function of urlmon (API-Guide has
that as well). This would probably be the easiest implimentation for a
relatively small file (say, less than 10-20 seconds to download).

If the file is somewhat large and you'd need to show a progress indicator
(progress bar, etc.), that'll be a little more complicated than the basic
API-Guide examples referenced above.



"albertleng" <albertleng@xxxxxxxxx> wrote in message
news:1178462505.847988.290940@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all.

Is there a way which i can use VB6 to refresh a website, for eg.
http://www.something.com/url...?

I need to do this because my program needs to download a file from a
webpage continuously in which the file will be updated constantly. We
notice that after the file is downloaded by my program, my program can
only download the file again after we press "Refresh" in Internet
Explorer on that website. If we don't "Refresh", the file won't be
there.

Since in future, nobody will be around the system, we need to refresh
the website automatically with my program.

Please help.

Thanks.

Albert



.



Relevant Pages

  • Re: window xp service pack 3
    ... refresh, which you can download. ... the final was only released to manufacturing yesterday, ... and is not available yet from their website. ...
    (microsoft.public.windowsxp.general)
  • VB6 to refresh a website
    ... Is there a way which i can use VB6 to refresh a website, ... I need to do this because my program needs to download a file from a ... only download the file again after we press "Refresh" in Internet ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6 to refresh a website
    ... I'm using ftp to download the file in which my program will ... i reckon i need to "refresh" that website with my program. ... only download the file again after we press "Refresh" in Internet ...
    (microsoft.public.vb.general.discussion)
  • Cant download mp3 or mpg files
    ... the problem is I can't download any type of file. ... I find I often have to press the refresh button to ... get the browser to completely display a website. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: I am put off from joining this group because of all the spam
    ... time than a single quick visit to a website. ... were interested in to download the bodies later. ... GUI for the news feed. ... indeed I still have my newsreader set to ...
    (uk.rec.walking)