get cookie

Discussion in 'PHP' started by mehdiali, May 13, 2008.

  1. #1
    hi there
    i visit a site and it set a cookie on my computer.
    i want to know is there any way that i can access to it?
    i want to know value and the name of it.
    how it set it, i mean it must some data to me, so can i get them?
    could i use form :
    var oXmlHttp = zXmlHttp.createRequest();
    oXmlHttp.open("get", "info.txt", true);
    oXmlHttp.send(null);
    displayCustomerInfo(oXmlHttp.response[/XML]);
    ...
    thank you
     
    mehdiali, May 13, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    You cannot access a cookie from another domain from a website. It's a security restriction that is built-in to Internet Explorer / Firefox / Etc. Otherwise a website could read all of the cookies on your computer and see everywhere you've been. Security would become a complete pain because session hijacking would be too easy.

    It may be possible with an activeX control or a 3rd party application, but there's no built-in way to read other website's cookies.
     
    jestep, May 13, 2008 IP
  3. mehdiali

    mehdiali Peon

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    how would be if i use somthing except browser ?
    for example telnet
     
    mehdiali, May 13, 2008 IP
  4. xrvel

    xrvel Notable Member

    Messages:
    918
    Likes Received:
    30
    Best Answers:
    2
    Trophy Points:
    225
    #4
    If the question is how do you know all cookies that are stored in your computer from yahoo,com, google,com, etc etc.

    You can use FireFox (use the latest one lol).

    Go to Tools > Options > Privacy > Cookies

    Click "Show Cookies" button.
     
    xrvel, May 14, 2008 IP