Embedding html form info into http header using as

Results 1 to 2 of 2

Thread: Embedding html form info into http header using as

  1. #1
    Join Date
    Dec 1969

    Default Embedding html form info into http header using as

    Embedding HTML form info into HTTP Header Using ASP Programmatically.<BR><BR><BR>What i want to do is very simple.<BR><BR>I want to submit a form on the server side programmatically using asp<BR>to another resource. <BR>Take the resulting output of that resource and place it in a string variable.<BR>And later find specific string combinations in that string variable.<BR><BR>E.g. take Hotmail website (for example).<BR>It has an html form with an "action" attribute.<BR>When the user enters the username and password and submits, the form is submitted to where<BR>ever the destination is. But this is done on the client side.<BR><BR>What i want to do is to submit the username and password<BR>from one asp page (on the server side) to a destination and to receive<BR>the output (that is the hotmail inbox page code) and assign it to an asp variable<BR>and to do some string manipulations.<BR><BR>Now i may not be correct here, but i think that the FORM username and password<BR>when submitted is submitted via the HTML header request. So i am trying to set say:<BR><BR>UserID=rizwan<BR>Password = rizwandar<BR><BR>information in the request header. And the destination should read this information somehow<BR>and log me into the site automatically. <BR><BR>Here is the code i am working with.<BR><BR>=================================<BR> <BR>&#060;%@ Language=JScript %&#062;<BR>&#060;html&#062;<BR>&#060;head&#062;<BR >&#060;title&#062;Consuming .NET Web Service in ASP&#060;/title&#062;<BR>&#060;/head&#062;<BR>&#060;body&#062;<BR><BR>Retrieve using XML DOM (Microsoft XML Core Services 4.0 required)<BR><BR><BR><BR>&#060;%<BR>var url, url1, url2, xmlhttp, HTML<BR> <BR>// url values. <BR>url2 = "some destination url may go in here. this is where the username and password will be posted to";<BR><BR>xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0");<B R><BR>xmlhttp.open("POST", url, false);<BR><BR>// Providing Proxy Information.<BR>xmlhttp.setProxyCredentials ("network\username","password");<BR>xmlhttp.setPro xy (0, "proxy server port number", "exclude these*");<BR><BR>xmlhttp.setRequestHeader ("lastCached", "July 01, 2002" );<BR><BR>// Setting Header<BR>xmlhttp.setRequestHeader("UserID","tests up");<BR>xmlhttp.setRequestHeader("password","test 1234");<BR><BR>xmlhttp.send();<BR>HTML = xmlhttp.responseText<BR>%&#062;<BR><BR>&#060;base href="&#060;%=url%&#062;"&#062;<BR>&#060;html&#062 ;<BR> &#060;body&#062;<BR> &#060;%=url%&#062;<BR><BR> &#060;%=HTML%&#062;<BR> &#060;/body&#062;<BR>&#060;/html&#062;<BR><BR>================================ =================<BR><BR>Problem:<BR>=========<BR> It does not seem to work !.. Am i doing something wrong here.

  2. #2
    Join Date
    Dec 1969

    Default Crosspost from Q&A and Advanced <eop>

    Please read FAQ #110, link is in the upper-right corner of this page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts