homepage Welcome to WebmasterWorld Guest from 54.205.247.203
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

    
how to POST from server to server
topr8




msg:3591038
 5:38 pm on Mar 4, 2008 (gmt 0)

how would i POST from my server to another (remote) server without using a web form with classic asp.

situation:

checkout on website with web form to collect name and address, this is posted to my server, where i want to extract the data and insert it to my database before then POST it to the card processor on a remote server where they prefill the name and address fields with the customer data i sent them and they also collect the credit card data etc.

alternatively i trap the data i want and present the user with another page of mine basically with a form button which they have to press to go to the gateway - i'd rather miss this step if possible.

 

duckhunter




msg:3592139
 5:52 pm on Mar 5, 2008 (gmt 0)

PostData = "field1=123&field2=345&field3=test+field+value
set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.open "POST", "https://someothersite.com/page.htm?" & PostData & "", false
xml.send ""
strStatus = xml.Status
strRetval = xml.responseText

Be sure to URLEncode the field values in the PostData string:
ie: test field value should show up as test+field+value

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved