Page 1 of 1

ReceiveHTTPFile() - please add flag for cache-using

Posted: Wed Apr 01, 2009 11:06 am
by gekkonier
If I use the buildin ReceiveHTTPFile() in a loop to grab pictures from an ip-cam, ReceiveHTTPFile() will always use a cached image, until i restart the program. Using the ReceiveHTTPFile() in a dll with OpenLibrary AND CloseLibrary doesn't fix this.

If I want "no caching" I tend to make an own exe and drive it with arguments, but I think it could be better if there would be an optional flag for ReceiveHTTPFile(), that says caching or not.

I also tried to use the WinApi functions:

Code: Select all

DeleteUrlCacheEntry_(url)
URLDownloadToFile_(#Null, url, localfile, #Null, #Null)
Here is the same problem, mainly because my lack of winapi knowledge.

I know, I could use this here:
http://www.purebasic.fr/english/viewtop ... 199#217199

It would be nice to download without caching in ReceiveHTTPFile() - It could make things much more easier.

Posted: Wed Apr 01, 2009 1:55 pm
by gekkonier
Okay, I found a workaround:

Basically this does what it does (without errorchecking, add it yourself 8) ):

Code: Select all

CacheFileName.s = Space(1024)
URLDownloadToCacheFile_(0,URL,CacheFileName,1024,0,0)
DeleteFile(CacheFileName)