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 string and send that string to the desired POST URL.

For Example:

    Dim objWinHttp
    Dim strResponseStatus
    Dim strResponseText
    Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
    objWinHttp.Open "POST", "", False
    objWinHttp.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    objWinHttp.Send "Name=John&Date=" & Server.URLEncode(Now())
    strResponseStatus = objWinHttp.Status & " " & objWinHttp.StatusText
    strResponseText = objWinHttp.ResponseText
    Set objWinHttp = Nothing
In the example above, the transport object (objWinHttp) is first created, opened, and the request is sent 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