travisbrown
Technical User
- Dec 31, 2001
- 1,016
Does anyone have a understandable method of setting a remote XMLHTTP request to use the same session as the requesting script? I've been reading about setting the request header, but not too sure about where to go with it. On the remote page, what's the next step?
Code:
FUNCTION XMLHTTP(url,params)
ck = Request.ServerVariables("HTTP_COOKIE")
IF url <> "" THEN
' Set xml = Server.CreateObject("Microsoft.XMLHTTP")
Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
xml.Open "GET", url & params, False
xml.setRequestHeader "Cookie",ck
xml.Send
XMLHTTP = xml.responseText
Set xml = Nothing
ELSE
XMLHTTP = "Error! No destination."
END IF
END FUNCTION