Sending leads from a site powered by Classic ASP (Active Server Pages)

To send leads in from a lead form's backend code, you would generate a POST XML and send that string to the desired POST URL.

For Example (C#):

    xmlString = "<Leads vid=""1234" lid=""1234" aid=""1234"">" & vbcrlf 
    xmlString = xmlString & "<Lead reference=""ABC1234"">" & vbcrlf 
    xmlString = xmlString & " <FirstName>John</FirstName>" & vbcrlf 
    xmlString = xmlString & " <LastName>Doe</LastName>" & vbcrlf 
    xmlString = xmlString & " <Email></Email>" & vbcrlf 
    xmlString = xmlString & "</Lead>" 
    xmlString = xmlString & "</Leads>"

    Set SendDoc = server.createobject("Microsoft.XMLDOM") 
    SendDoc.ValidateOnParse= True 

    sURL = ""

    Set poster = Server.CreateObject("MSXML2.ServerXMLHTTP") "POST", sURL, false 
    poster.setRequestHeader "CONTENT_TYPE", "text/xml" 
    poster.send xmlString 

    Set NewDoc = server.createobject("Microsoft.XMLDOM") 
    newDoc.ValidateOnParse= True 

    Set XMLSend = NewDoc 
    Set poster = Nothing
In the example above, the example POST XML is first generated and then is sent through the request object to the POST URL. The response is then received and would then be processed to determined the desired action depending on the sending page's requirements and method sent to.

Copyright ©2012