A Simple PHP question

Discussion in 'PHP' started by siddharth01, Apr 17, 2011.

  1. #1
    Hi all,

    Can I check cookies set by other servers using PHP? Suppose www.agoodsite.com set a cookie in the browser, can I access that cookie? I dont want the details in the cookie. I just want to know weather www.agoodsite.com was set a cookie or not.

    If so, please let me know how.

    Thanks
     
    siddharth01, Apr 17, 2011 IP
  2. bbqhotgamesb

    bbqhotgamesb Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    For security reasons the specification does not allow you any access, even knowledge about the existence of a cookie, from other top level domains.
     
    bbqhotgamesb, Apr 17, 2011 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    Unfourtanetly, a cookie can only be read by the same domain that set it.
     
    danx10, Apr 17, 2011 IP
  4. baligena

    baligena Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The reason if your wondering why it wont work is because it keeps hackers from accessing your information and using it
     
    baligena, Apr 17, 2011 IP
  5. littlejohn199

    littlejohn199 Peon

    Messages:
    42
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    It is not doable using PHP. For testing and debugging your web app, you can use FireBug to view cookie that is set from a site.

    Little John
     
    littlejohn199, Apr 17, 2011 IP