Re: Linking to excel spread*** over the Internet

From: Sietse Wijnker (sietse.wijnker_at_ATsw-software.nl)
Date: 09/17/04

  • Next message: Matthew Freeze: "Re: Linking to excel spread*** over the Internet"
    Date: Sat, 18 Sep 2004 00:09:51 +0200
    
    

    Hi Matthew,

    To download a file from the internet you can use the following:
    DECLARE INTEGER URLDownloadToFile ;
     IN urlmon.dll ;
      INTEGER pCaller, ;
      STRING szURL, ;
      STRING szFileName,;
      INTEGER dwReserved, ;
      INTEGER lpfnCB

     = URLDownloadToFile (0, lcURL, lcLocalFile, 0, 0)
    The problem here is that there's no way of knowing the file size and date
    before downloading it. To retrieve that kind of information you can place an
    XML file next to it specifying the file size and date, and retrieve the XML
    file in the same way, or you can use the XMLHTTP object like this:

    objHTTP = CreateObject("MSXML2.XMLHTTP")
    objHTTP.Open("GET", url,.f.)
    objHTTP.Send()

    After a successfull dwnload the objHTTP.responsexml cotains the XML that is
    retrieved in a DOM

    Maybe there's a better way for etrieving file info before you download, but
    i'm still searching for it

    Regards,
    Sietse Wijnker


  • Next message: Matthew Freeze: "Re: Linking to excel spread*** over the Internet"
    Loading