asp XML code to php

admin

Administrator
Staff member
Hi guys, first time here.

I have a script which handles some XML here written in asp:

<%@ Language=VBScript %>
<%
str = "<?xml version=""1.0"" encoding=""UTF-8""?>"
str = str & "<linecheck>"
str = str & "<sp>"
str = str & "<username>USERNAMEHERE</username>"
str = str & "<password>PASSWORDHERE</password>"
str = str & "<spid>IDHERE</spid>"
str = str & "</sp>"
str = str & "<check>"
str = str & "<telephone>randomdata</telephone>"
str = str & "<postcode>randomdata</postcode>"
str = str & "</check>"
str = str & "</linecheck>"
'response.Write str

dim xmlhttp
set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST","POSTADDRESSHERE", false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send str
Response.ContentType = "text/xml"
Response.Write xmlhttp.responsexml.xml
'response.write "<P>XML HTTP Obj Created"
Set xmlhttp = nothing

%>

For one reason and another i now need to convert this in to php.

However php is a language i have never dabbled with before and am a bit clueless.

Looking for a good, asp - php converting tutorial or some handy advice.

Cheers Guys
 
Back
Top