XML Request Response Converted
Project ID: 1231359942
Project Details
- Status: Closed (Cancelled)
- Posted: 1/7/2009 at 15:25 EST
- Cancelled: 1/31/2009 at 0:40 EST
- Project Creator:
- Budget: $25
- Description: Hi,
I need a simple php script to post xml and process response. The script following Visual Basic script needs converting to work with PHP:
'create the xml
Dim oXmlHTTP as Object
Dim oXMLDoc as Object
Dim oHeader as Object
Dim oElement as Object
Dim oTextNode as Object
set oXmlDoc = CreateObject("MSXML.DOMDocument")
set oHeader = oXmlDoc.createElement("BlackHorse")
oXmlDoc.appendChild(oHeader)
set oElement = oXmlDoc.createElement("CAP")
oHeader.appendchild(oElement)
set oTextNode = oXmlDoc.createTextNode(sCAP)
oElement.appendChild oTextNode
set oElement = oXmlDoc.createElement("Term")
oHeader.appendchild(oElement)
set oTextNode = oXmlDoc.createTextNode(sPer)
oElement.appendChild oTextNode
set oElement = oXmlDoc.createElement("Mileage")
oHeader.appendchild(oElement)
set oTextNode = oXmlDoc.createTextNode(sMile)
oElement.appendChild oTextNode
'send XML
Dim sUrl as string
Dim sXML as string
sURL = "https://www.domain.com"
Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP")
oXmlHTTP.Open "POST", sURL, False
oXmlHTTP.Send(oXMLDoc.xml)
'Process repsonse
Set oXMLDoc = oXmlHTTP.responseXML
sXML = oXMLDoc.XML
If left(sXML,3) = "<GF" then
Set oTextNode = oXMLDoc.getElementsByTagName("GFV")
sXML = oTextNode.Item(0).nodeTypedValue
sXML = "Blackhorse GFV for " & sCAP & " after " & left(sPer, 1) & " years." & chr(10) & _
"Calculated on " & sMile*1000 & " mpa is - £ " & sXML
msgbox sXML
Gosub WriteNote
Else
Set oTextNode = oXMLDoc.getElementsByTagName("Error")
sXML = oTextNode.Item(0).nodeTypedValue
msgbox "Cannot find vehicle - Ensure a current model is selected"
End If
Set oTextNode = nothing
Set oElement = nothing
Set oHeader = nothing
Set oXMLDoc = nothing
Set oXmlHTTP = nothing
Exit Sub
It can only be tested from my IP Address due to firewall restrictions. This is a relatively simple project so sensible bids please, thanks.
Kind regards,
StevenAdditional Info (Added 1/7/2009 at 16:16 EST)...This could also be done using Javascript/Ajax - Tags:
| Project Bids |
| Programmer | Bid |
Delivery Time | Time of Bid | Rating | |
| encomputers | $22 | 1 day | 1/21/2009 at 10:32 EST | (3 reviews) |
|
| please use pmb for further details or visit portfolio. | |||||
| australiandeveloper | $25 | 1 day | 1/8/2009 at 15:23 EST | (1 review) |
|
| Hi this looks like a very simple project. I can do it in PHP or in Javascript/AJAX as you want. Should only take me a couple of hours. | |||||
| nd3h | $25 | 1 day | 1/19/2009 at 2:32 EST | (1 review) |
|
| ok, lets start | |||||
| quanmt | $30 | 1 day | 1/7/2009 at 16:02 EST | (27 reviews) |
|
| Hi Sir We are a web develop team from Vietnam. We have 4 years in develop web site by php, mysql, ajax, flash. Let us show our ability. Thank. | |||||
| octalsystems | $50 | 4 days | 1/7/2009 at 15:42 EST | (143 reviews) |
|
| i can do it right now Escrow to start Thank You | |||||






