''**** More questionable code from infin8loop and the ShotGun School of Programming and Bartending ''**** No warranties either expressed or implied. Use at your own risk. ''**** You must change the following 3 values to your specific configuration strURL = "http://192.168.0.40/callhistory.xml" ''change 192.168.0.40 above to the local IP address of your Obi strPassword = "obipassword" ''change obipassword above to the password of your local Obi page login strDirectoryPath = "C:\Call_History" ''change C:\Call_History above to the full path of the directory to save the history files into. The Directory must already exist. ''**** You must change the above 3 values to your specific configuration ''**** Leave everything below this comment alone unless you know what you're doing. Well, that never stops me, but anyway.... On Error Resume Next Set objHTTP = CreateObject("Microsoft.XMLHTTP") objHTTP.open "POST", strURL, False, "admin", strPassword objHTTP.send if objHTTP.status <> 200 then wscript.echo "Status code = " & objHTTP.status & " : " & objHTTP.statusText wscript.quit(2) end if Set BinaryStream = CreateObject("ADODB.Stream") BinaryStream.Type = 1 BinaryStream.Open BinaryStream.Write objHTTP.responseBody if err.number <> 0 then wscript.echo "Unable to get history or no history to get" wscript.quit(2) end if strFileName = strDirectoryPath & "\callhistory_" & GetCurDate() & "_" & GetCurTime() & ".xml" BinaryStream.SaveToFile strFileName, 2 Set BinaryStream = Nothing Set objHTTP = Nothing ''**** Utility Functions Follow **** Function GetCurDate() GetCurDate = Year(Date) & PadZeros(Month(Date),2) & PadZeros(DAY(Date),2) End Function Function GetCurTime() GetCurTime = PadZeros(Hour(Time),2) & PadZeros(Minute(Time),2) & PadZeros(Second(Time),2) End Function Function PadZeros(n, totalDigits) On Error Resume Next If totalDigits > len(n) Then PadZeros = String(totalDigits-len(n),"0") & n Else PadZeros = n End If End Function