Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLHTTP and Persistent Sessions

Status
Not open for further replies.

travisbrown

Technical User
Dec 31, 2001
1,016
0
0
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top