Downloads a file from the internet using the HTTP, HTTPS or FTP protocol.
InetRead ( "URL" [, options] )
| URL | URL of the file to download. See remarks below. |
| options | [optional] 0 = (default) Get the file from local cache if available. 1 = Forces a reload from the remote site. 2 = Ignore all SSL errors (with HTTPS connections). 4 = Use ASCII when transfering files with the FTP protocol (Can not be combined with flag 8). 8 = Use BINARY when transfering files with the FTP protocol (Can not be combined with flag 4). This is the default transfer mode if none are provided. 16 = By-pass forcing the connection online (See remarks). |
| Success: | A binary string and @extended set to the number of bytes downloaded. |
| Failure: | Sets @error to non-zero and returns an empty string. |
Local $sData = InetRead("http://www.autoitscript.com/autoit3/files/beta/update.dat")
Local $nBytesRead = @extended
MsgBox(4096, "", "Bytes read: " & $nBytesRead & @CRLF & @CRLF & BinaryToString($sData))