

To save a binary file use this code instead of previous lineBinStream = new ActiveXObject('ADODB.Stream') BinStream.Type = 1 BinStream.Open BinStream.Write(WinHttpReq.ResponseBody) BinStream.SaveToFile('out.bin'). You only need to do this once for all the time you will be using the $client object.

The credentials you enter there will be used to download the file.
