cookie|xml| data
Here are some of the relatively complex applications. Using the appropriate method, you can pass cookies in XMLHTTP and submit the form.
These also remind us of the need to prevent the vulnerabilities that this method brings.
First, transfer form data to the server
Dim forminfo,objxmlhttp
forminfo= "user=niceidea&pw=111111"
Set objxmlhttp = Server.CreateObject ("Microsoft.XMLHTTP")
Objxmlhttp.open "POST", "http://niceidea.org/cmd.asp?...", False
Objxmlhttp.send FormInfo
When it comes to Chinese characters, you need to escape the function.
The Escape () function converts all characters to ASCII encoding.
forminfo= "User=niceidea&name=" &escape ("Chinese")
Niceidea signed a souvenir.
Second, send cookies
Dim cookie:cookie= "Waufhfggadua"
Set objxmlhttp = Server.CreateObject ("Microsoft.XMLHTTP")
Objxmlhttp.open "POST", "Http://www.niceidea.org/cmd.asp?act=vrs", False
Objxmlhttp.setrequestheader "cookies", cookies
Objxmlhttp.send
Third, get the header of the returned information (including cookie information)
@ codepage=65001
Response.AddHeader "Encoding", "Utf-8"
Set objxmlhttp = Server.CreateObject ("Microsoft.XMLHTTP")
Objxmlhttp.open "POST", "http://localhost/cookie.asp", False
Objxmlhttp.setrequestheader "cookies", cookies
Objxmlhttp.send
Response.Write (Objxmlhttp.getallresponseheaders ())
of which cookie.asp
Response.Cookies ("test") = "Test"
return Result:
Connection:keep-alive Date:fri, Mar 2006 20:07:13 GMT server:microsoft-iis/6.0 x-powered-by:asp.net Content-Length: 0 content-type:text/html Set-cookie:test=test; path=/cache-control:private