Dobrý deň,
"prelozil" by mi niekto prosím tento kód do jazyka PHP?
Kód:
Option Explicit
Main
Private Sub Main
Dim strUrl, strFile
strUrl = "http://JMENO:HESLO@WWW.CYBERSOFT.CZ/i6ws/Default.asmx/GetResultByCode?resultType=StoItemBase&code=600623"
strFile = "C:\StoItemBase.xml"
With CreateObject("MSXML2.XMLHTTP")
WScript.Echo "Opening url: " & strUrl
.Open "GET", strUrl, False
.Send
If .Status <> 200 Then Err.Raise vbObjectError + 1, "GetResponseXml", "Bad response status: [" & .Status & "] " & .StatusText & vbCrLf & .ResponseText
WScript.Echo "Saving file: " & strFile
.ResponseXml.Save strFile
WScript.Echo "Done."
End With
End Sub
Ďakujem.