Not sure if this is what you're looking for or not.
I've modified the code so it's more generic, but here's my solution for getting product registration data from a database I keep on my site.
The request for data from my server.....
xO is previously defined as the customers order ID
Code:
SendString = "xO=" & xO
set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
objHTTP.open "POST", "<A href="http://www.mysite.com/Xcheck.asp",false">http://www.mysite.com/Xcheck.asp",false
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send SendString
xStatus = objHttp.Status
xResult = objHttp.ResponseText
'
If xStatus = "200" then 'communication was Good
If InStr(xResult,"License")>0 then
tL = xResult
Else
tL = "INVALID"
xMessage = ""
If InStr(xResult,"ERROR")>0 then
xMessage = xResult
End If
End If
' some code to update my database
Else
tL = "ERROR"
xMessage = "Can't communicate with Licensing Server"
End If
Set objHTTP = Nothing
And the code on my server is....
Code:
Response.ContentType = "text/xml"
xL="INVALID"
If Len(Request("xO"))=8 then
Set Q1 = Server.CreateObject("ADODB.Connection")
Q1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\mysite\data\Db1.mdb"
Set rsQ = Server.CreateObject("ADODB.Recordset")
rsQ.Open "SELECT TOP 1 * FROM VMtable",Q1
If rsQ.EOF then
xMessage="ERROR: OrderID Not in Our Database!"
Else
xL = Request("xO")
End If
Else
xMessage="ERROR: OrderID Invalid!"
End If
If xL = "INVALID" then
strXML = "<?xml version=""1.0"" encoding=""iso-8859-1""?>" & _
"<response><error>1</error><message>" & xMessage & "</message></response>"
Response.write strXML
Response.End
Else
strXML = "<?xml version=""1.0"" encoding=""iso-8859-1""?>" & _
"<response><error>0</error><message>License=" & xL & "</message></response>"
Response.write strXML
'
' then I have some code to update my database...
End If
rsQ.close : Set rsQ=nothing : Q1.close : Set Q1=Nothing
The actual code is more complex, but this should give you the basic idea.
Tim