<%
'//-------------------------------------
'//DoppelMe Constants
'//-------------------------------------
DOPPELME_SITE = "http://api.doppelme.com"
DOPPELME_SERVICE = "http://services.doppelme.com/partnerservice.asmx"
DM_PARTNER_ID = 1 '//put your partner id here
DM_PARTNER_KEY = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" '//put your partner key here
'//-------------------------------------
'//DoppelMe Functions
'//-------------------------------------
Function PartnerServiceCall(sURL, sPARAMS)
sURL = DOPPELME_SERVICE & "/" & sURL
Set oHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")
oHTTP.Open "POST", sURL, FALSE
oHTTP.SetRequestHeader "Content-type", "application/x-www-form-urlencoded"
oHTTP.Send sPARAMS
if oHTTP.status = 200 then
sReturnXML = HTMLDecode(oHTTP.responseText)
'//strip wrapper from return XML
sReturnXML = Replace(sReturnXML,"<string xmlns=""http://services.doppelme.com/"">","")
sReturnXML = Replace(sReturnXML,"</string>","")
else
sReturnXML = ""
end if
PartnerServiceCall = sReturnXML
End Function
Function HTMLDecode(sText)
Dim I
sText = Replace(sText, """, Chr(34))
sText = Replace(sText, "<" , Chr(60))
sText = Replace(sText, ">" , Chr(62))
sText = Replace(sText, "&" , Chr(38))
sText = Replace(sText, " ", Chr(32))
For I = 1 to 255
sText = Replace(sText, "&#" & I & ";", Chr(I))
Next
HTMLDecode = sText
End Function
'//a very simple sanitizer function given here purely as an example.
'//you should use your own more robust/complete sanitizer
Function CleanTaintedInput(sText)
on error resume next
sText = Replace(sText,"'","")
if Err.number <> 0 then
sText = ""
end if
End Function
%>