1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

MSXML Request w/ Cookies

Discussion in 'C#' started by mrbrantley, Jul 30, 2008.

  1. #1
    I am doing a MSXML request from one of my sites to another of my sites. They are hosted on different servers. When I do the request with a responseText command, it will set the cookies from the page I am calling with MSXML. In this instance, I do not want the entire page to load, just the cookies be presented to the user. I have a conditional statement which will set the cookies per the querystring, I just cannot figure out how to request the document and get the cookies without having it print to the screen.

    My current code is:

    <% 
    url = "http://www.site2.com" 
    set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
    xmlhttp.open "GET", url, false 
    xmlhttp.setRequestHeader
    xmlhttp.send "" 
    set xmlhttp = nothing
    %> 
    Code (markup):
    Thanks all!
     
    mrbrantley, Jul 30, 2008 IP
  2. VishalVasani

    VishalVasani Peon

    Messages:
    560
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hello,

    Can you provide more code for better understanding.
     
    VishalVasani, Jul 31, 2008 IP
  3. mrbrantley

    mrbrantley Member

    Messages:
    87
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #3
    That should be all the code nessicary. The MSXML object loads the remote page via XML. The page loads fine and accepts the cookies, but I do not want the entire page to output to the screen. I want the MSXML object to just gather the headers / cookies of the remote page, not display the whole page itself.
     
    mrbrantley, Jul 31, 2008 IP