简体   繁体   中英

Asp Classic cURL equivalent

I need to basically forward post variables get the response and feed it back to an ajax post.

Essentially : I have an ajax post that needs to post to an ASP file. This file needs to forward these post variables to a PHP file and await a response. The ASP file should then receive a response and relay that to the callback on the original ajax post.

I can write this quite quickly in PHP but am hoping for an ASP classic alternative as it is on a windows server with no PHP support.

Thanks in advance.

This ended up working for me. thanks for your help!

<% 
set XmlObj = Server.CreateObject("Microsoft.XMLHTTP") 
XmlObj.open "POST", "domain.co.za?var1="; & request.form("var1") & "&firstname=" & request.form("firstname") & "&action=" & request.form("action") , false 
XmlObj.send formatdata = XmlObj.responseText 
Response.write(formatdata) 
Set XmlObj = nothing 
%>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM