Check Last-Modified when downloading files from Internet
-
Hi! I think it's just a simple question, but I haven't found any code that helps me... I like to download a file from the internet using the InternetConnect & HttpOpenRequest which works fine. My problem is, that I want to check if the file is newer than a specific date, and if not use a local file. My first solution was to use some kind of "Only if newer" field in the HTTP header, but I haven't figured out how this works... So now I try to send the request, parse the headers from HttpQueryInfo() and check for the "Last-Modified: " line and parse it. Works fine - except that the whole file is transferred before I can check the date&time. So I'll be glad if you have some code like BOOL IsInternetFileNewerThan(CTime tmCompareTo); Thanks + Ciao, Alexander