cURL / Mailing Lists / curl-users / Single Mail

curl-users

html post and curl

From: <kourk_at_dls.net>
Date: Thu, 28 Nov 2002 22:46:47 -0600

Does anyone have an example of using cURL to send information through an ASP
post method. Here is how I do it using WinHttp. My webhosting company has
our website on a linux server which does not
support WinHttp. They do however support cURL. I need to do something very
similar to below. I'm particularly interested in receiving the response back
as is demonstrated also below. If you can help in any way it would be
greatly appreciated...Thanks.

PostData = PostData & "x_Address=" & Trim(Request("x_Address"))
PostData = PostData & "&x_Amount=" & Trim(Request("x_Amount"))
PostData = PostData & "&x_Auth_Code=" & Trim(Request("x_Auth_Code"))
PostData = PostData & "&x_Bank_ABA_Code=" & Trim(Request("x_Bank_ABA_Code"))
PostData = PostData & "&x_Bank_Acct_Num=" & Trim(Request("x_Bank_Acct_Num"))
PostData = PostData & "&x_Bank_Acct_Type=" &

Trim(Request("x_Bank_Acct_Type"))

PostData = PostData & "&x_Bank_Name=" & Trim(Request("x_Bank_Name"))
PostData = PostData & "&x_Card_Code=" & Trim(Request("x_Card_Code"))
PostData = PostData & "&x_Card_Num=" & Trim(Request("x_Card_Num"))

' Create the object.

Set objWinHttp = Server.CreateObject("WinHttp.WinHttpRequest.5")

' Set the parameters.

objWinHttp.Open "POST", "https://secure.authorize.net/gateway/transact.dll?"
& PostData

' Send it.

objWinHttp.Send

'Authorize.Net does its thing to the transaction request, and then
'returns the response string back to our object.

' Get the response string from the object.
strResponse = objWinHttp.ResponseText

'Put response string into an array.
arrResponseValues = Split(strResponse, "|", -1, 1)

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-12-10