Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Always getting the same old page from internet
Message
From
15/02/2011 08:08:08
 
 
To
15/02/2011 08:01:36
General information
Forum:
Visual FoxPro
Category:
Internet applications
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01500188
Message ID:
01500217
Views:
47
Isn't that what I suggested ?

>Hi Boris,
>I tried with your code but I got into other problems so I made a search on the internet and finally I got it. In this way it works fine
>
>
>Function GetFileFromUrl
>Lparameters lcRemoteFile, lcLocalFile
>Declare Integer URLDownloadToFile In urlmon.Dll;
>  INTEGER pCaller, String szURL, String szFileName,;
>  INTEGER dwReserved, Integer lpfnCB
>
>DECLARE integer DeleteUrlCacheEntry in wininet.dll ;
>	String lpszUrlName 
>
>	=DeleteURLCacheEntry(lcremotefile)
>
>Return URLDownloadToFile (0, lcRemoteFile, Iif(Empty(lcLocalFile), JustFname(lcRemoteFile), lcLocalFile), 2, 0) = 0
>
>
>thank you all
>
>
>>>Hi all,
>>>I'm trying to get news from a site (www.ansa.it). My problem is that I get the current page just at my first connection, while the procedure carry on giving me the same page also when the page is changed.
>>>I suppose it is due to some buffer.
>>>How can I do to get over that ?
>>>
>>>Actually I have a timer which goes repeatly to download an URL.
>>>
>>>for downloading data I use this function
>>>
>>>
>>>
>>>Function GetFileFromUrl
>>>Lparameters lcRemoteFile, lcLocalFile
>>>Declare Integer URLDownloadToFile In urlmon.Dll;
>>>  INTEGER pCaller, String szURL, String szFileName,;
>>>  INTEGER dwReserved, Integer lpfnCB
>>>Return URLDownloadToFile (0, lcRemoteFile, Iif(Empty(lcLocalFile), JustFname(lcRemoteFile), lcLocalFile), 0, 0) = 0
>>>
>>
>>You read the cache.
>>To full the function you could try to use it like that:
>>
>>Function GetFileFromUrl
>>Lparameters lcRemoteFile, lcLocalFile
>>Declare Integer URLDownloadToFile In urlmon.Dll;
>>  INTEGER pCaller, String szURL, String szFileName,;
>>  INTEGER dwReserved, Integer lpfnCB
>>*** Let's try to full the function
>>  lcRemoteFile = lcRemoteFile + [?]+SYS(2015)
>>Return URLDownloadToFile (0, lcRemoteFile, Iif(Empty(lcLocalFile), JustFname(lcRemoteFile), lcLocalFile), 0, 0) = 0
>>
>>That way the remote file will look like:
>>"http:\\www.somesite.com\thefile.exe?_CASASA"
>>and every time will be different. That way you will skip the local page cache.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform