oversæt fra asp til php
Jeg har nedenstående script i asp men skal have det oversat til php.Er der nogen som kan hjælpe?
På forhånd mange tak
<%@ Language=VBScript %>
<% OPTION EXPLICIT %>
<%
dim Account, Username, Password, WebService_URL
Account = "account"
Username = "username"
Password = "pass"
WebService_URL = "http://demo.golfbox.dk/ (...)
dim soapMessage, SOAPObject, soapResult
soapMessage = "<?xml version=""1.0"" encoding=""utf-8""?>" &_
"<soap:Envelope xmlns:xsi=""http://www.w3.org/ (...) xmlns:xsd=""http://www.w3.org/ (...) xmlns:soap=""http://schemas.xmlsoap.org/ (...) &_
"<soap:Header>" &_
"<UserCredentials xmlns=""http://golfbox.net/ (...) &_
"<Account>" & Account & "</Account>" &_
"<Username>" & Username & "</Username>" &_
"<Password>" & Password & "</Password>" &_
"</UserCredentials>" &_
"</soap:Header>" &_
"<soap:Body>" &_
"<GetList xmlns=""http://golfbox.net/ (...) &_
"<HeadersOnly>false</HeadersOnly>" &_
"</GetList>" &_
"</soap:Body>" &_
"</soap:Envelope>"
set SOAPObject = server.CreateObject("MSXML2.ServerXMLHTTP")
call SOAPObject.Open("POST", WebService_URL, false)
call SOAPObject.setRequestHeader("Content-Type", "text/xml; charset=utf-8")
call SOAPObject.setRequestHeader("Content-Length", len(soapMessage))
call SOAPObject.setRequestHeader("SOAPAction", "http://golfbox.net/ (...))
call SOAPObject.send(soapMessage)
if SOAPObject.ReadyState = 4 then
set soapResult = server.CreateObject("msxml2.domdocument.4.0")
call soapResult.loadXML(SOAPObject.responseText)
dim nodes : set nodes = SOAPResult.selectNodes("//NewsItem")
dim g
for g = 0 to nodes.length - 1
if nodes(g).selectSingleNode("GUID").text = request.QueryString("News_GUID") then
response.Write("<b>» <a href=""ws_getnews.asp?News_GUID=" & server.URLEncode(nodes(g).selectSingleNode("GUID").text) & """>" & nodes(g).selectSingleNode("Subject").text & "</a></b><br>")
response.Write("<div style=""padding-left:15px"">" & nodes(g).selectSingleNode("Body").text & "</div><br/>")
else
response.Write("» <a href=""ws_getnews.asp?News_GUID=" & server.URLEncode(nodes(g).selectSingleNode("GUID").text) & """>" & nodes(g).selectSingleNode("Subject").text & "</a><br>")
end if
next
end if
%>