http - 如何在 Classic ASP 中将 HTTP 发布数据发送到 Web 中的任何页面?

标签 http asp-classic

如何在经典 ASP 中将数据 http 发布到 Web 中的任何页面?

最佳答案

出于以下原因,我建议使用 ServerXMLHTTP 而不是 XmlHttp:

XMLHTTP is designed for client applications and relies on URLMon, which is built upon Microsoft Win32 Internet (WinInet). ServerXMLHTTP is designed for server applications and relies on a new HTTP client stack, WinHTTP. ServerXMLHTTP offers reliability and security and is server-safe.

http://support.microsoft.com/kb/290761

例子:

    DataToSend = "id=1"
    dim xmlhttp 
    set xmlhttp = server.Createobject("MSXML2.ServerXMLHTTP")
    xmlhttp.Open "POST","http://localhost/Receiver.asp",false
    xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    xmlhttp.send DataToSend
    Set xmlhttp = nothing

关于http - 如何在 Classic ASP 中将 HTTP 发布数据发送到 Web 中的任何页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1699757/

相关文章:

http - 如何从 HTTP GET 请求的 Wireshark 转储中获取源 IP

IIS7 - 在 ASP 中指定内容长度 header 会导致 "connection reset"错误

css - 为 ASP Classic 中的导航菜单将 CSS 类设置为 "current"

PHP:新手问题 - 类似于 php 中的 with/end with ?

iis - 经典ASP-捕获500个错误

http - Golang Cookie Max-Age 与过期

mongodb - 使用 ids 数组表单数据库获取所有匹配项目

asp-classic - ASP 可以查询位于另一台服务器上的数据库吗?

http - 使用基本身份验证和表单值进行 Http Post 请求

http - 如何确保 HTTP 上传来自真实的可执行文件