|
Scripts > HTTP Session Request |
HTTP Session RequestThis VBScript function can be used to maintain the HTTP session state when retrieving webpages with XMLHTTP. The Cookies and Referrer are stored, and subsequent HTTP requests are re-constructed using these HTTP headers. For example, if the first HTTP request performs a login at a website, then the second HTTP request will be performed using the same HTTP session, which has the effect of operating as the logged-in user. This function can be used in ASP pages, VB, WSH, and in VBA code in Microsoft Office. View the code section below for more information, or view the demo. VBScript CodeThe code provides a single generic function listed below: By using this function to retrieve web pages, the cookies and referrer headers are retained and the session state therefore persists between HTTP requests. The following code demonstrates how the function can be used from within a VBS file on the desktop. Replace url1 with a login page, and url2 with a page which is protected by that login.
Purchasing OptionsThe HTTP Session Request function is available as a VBScript function that can be used in your ASP pages and VB code. Click the button below to purchase: |
See Also
|
KeywordsHTTP session, ASP session, setRequestHeader, http headers, http cookies, asp cookie, http referrer, referer, http session, MSXML2, XMLhttp, XML, ASP pages, VB, WSH, VBA, Microsoft Office |
|
|
| Top | Home | ECommerce | Hosting | Site Map | Search | © 2003-6 | Contact |