ReceiveHTTPFile()

语法

Result = ReceiveHTTPFile(URL$, Filename$)
概要
Download a file to disk from the given URL$.

参数

URL$ The URL to download from.
Filename$ The local filename to write the file to. If the filename does not include a full path, it is interpreted relative to the current directory. If the file exists, it will be overwritten.

返回值

Returns nonzero if the download was successful or zero if not.

Remarks

InitNetwork() has to be called before using this command.

示例

  InitNetwork()

  Filename$ = SaveFileRequester("Where to save index.php3 ?", "", "", 0)

  If ReceiveHTTPFile("http://www.purebasic.com/index.php3", Filename$)
    Debug "Success"
  Else
    Debug "Failed"
  EndIf

参阅

GetHTTPHeader(), URLEncoder()

已支持操作系统

所有

<- GetURLPart() - Http Index - SetURLPart() ->