wdownload()

 
Downloads and stores a file from a URL. Acts as a front end to wget()
Syntax
wdownload( url, filepath, location, callback, callbackdata var )
Returns -1 if fails, returns the server response code: Possible examples 200 = success, 301 = moved, 404 = not found.
  • url = file to retrieve
  • filepath = where destination file should be stored
  • location = destination 'data' or 'script'.callback_fn = the name of a callback function in current Miva Script file
  • callback_fn( size, total, data var ): a user defined user function that returns 1 to continue, 0 to abort.
  • callbackdata var = opaque data that is passed as the data parameter to each call of callback_fn
User Annotations: wdownload