1 Replies - 3647 Views - Last Post: 01 October 2009 - 08:09 AM Rate Topic: -----

#1 Nebula  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-August 06

Read Data From Online Text File

Posted 01 October 2009 - 07:06 AM

Hello,

I am trying to decide the best way to perform a function. I've written a program and I want it to be able to check for updates. There are code and library updates. Library data to be updated more often.

My process is to reference my website where there is a directory containing a text file. In this file is the name of the latest library archive to be downloaded. I want to read this filename from the text file then use it to download the library file from my website. I was hoping to avoid downloading the text file itself to read it. I would prefer to just read it where it lies. There won't be more than two or three lines to be read. It will contain something like:

LIB090916.EXE
APP090901.EXE
MAN090610.PDF


I have been working with the Inet feature of VB6. I was able to read and select html code from my site but I've not been able to find a nice snippet for reading a file online. Most have you downloading the text file first. I guess it I have too, there's no choice. But I would really prefer to just read it online and then only have to download the update itself.

It's funny to me. It seems a simple process for most applications today to check for updates. But the more I think about how to do it, it seems more complicated than I expected. Maybe I'm looking too hard. haha

Just to be clear, I'm not asking you to write me the code (unless you just enjoy doing so). I was hoping for to get a reference to some function or method, a snippet of code that I can build upon. It has to be in VB. I am adding this code to my current app written in VB. VB.NET is not an option. This code has been around for nearly 8 years, written by 5 different programmers. Not the most fun app I've ever written! lol

Thanks for your time,

Doug

Is This A Good Question/Topic? 0
  • +

Replies To: Read Data From Online Text File

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Read Data From Online Text File

Posted 01 October 2009 - 08:09 AM

VB6 does not lend itself to reading files over the internet however you can use the URLDownloadToFile API to download it, then read it, then delete it as necessary.

Another method would be to use the webbrowser control and navigate to the file but once again it is being downloaded to your computer.

Or you could create a service on the webserver that you would connect to (like an automated chat).



Good Luck
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1