1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

用XMLHTTP获得用Post提交的页面的数据

本帖由 小叶2006-02-15 发布。版面名称:前端开发

  1. 小叶

    小叶 New Member

    注册:
    2005-09-04
    帖子:
    17,941
    赞:
    33
    Dim objXML,URL
    Dim str
    str="name=cc&password=tt"
    Set objXML=Server.CreateObject("Microsoft.XMLHTTP")
    objXML.Open "post",URL,false
    objXML.SetRequestHeader "Content-Type","Application/x-www-form-URLEncoded"
    objXML.SetRequestHeader "Content-length",Len(str)
    objXML.Send(str)
    Set objXML=Nothing


    以前写的一个函数:
    Function getHtml(URL,str)
    '取得提交表单后的信息
    'By kingwmx

    Dim objXML
    Set objXML=Server.CreateObject("Microsoft.XMLHTTP")
    objXML.Open "post",URL,false
    objXML.SetRequestHeader "Content-Type","Application/x-www-form-URLEncoded"
    objXML.SetRequestHeader "Content-Length",Len(str)
    objXML.Send(str)
    getHTML=objXML.ResponseBody
    Set objXML=Nothing
    End Function
     
  2. wm_chief

    wm_chief New Member

    注册:
    2005-09-05
    帖子:
    17,890
    赞:
    46
  3. 小叶

    小叶 New Member

    注册:
    2005-09-04
    帖子:
    17,941
    赞:
    33
    :eek: 白痴。
     
  4. wm_chief

    wm_chief New Member

    注册:
    2005-09-05
    帖子:
    17,890
    赞:
    46
    你超bc
     
  5. 小叶

    小叶 New Member

    注册:
    2005-09-04
    帖子:
    17,941
    赞:
    33
  6. 老林

    老林 New Member

    注册:
    2005-09-06
    帖子:
    10,580
    赞:
    36
    objXML.Open "post",URL,false