Jump to content

Recommended Posts

My boss has asked me to build a php support site which he wants to be able to utilise the cookie from our company's main site for user validation.

How do i go about utilising a cookie intended for our other site, or do i need to modify the way cookies are created by the other site to allow for access?

Link to comment
https://forums.phpfreaks.com/topic/75210-using-a-sister-sites-cookie/
Share on other sites

I'm quite sure you cant do that unless they're on the same server, because cookies are stored on the server.

 

No no no.  Please make sure you know what you talking about before you say something.  Cookies are stored Client Side  that means they are on that users computer.  However your server can't just start eating all the cookies out there (metaphorically)  it can only access cookies that are associated with its domain.  Now your question is how to handle this.  The simple way to do this is to have the scripts that make cookies on Site A have an intermediate step to make the same cookies associated with site B.  Thus the same data is available.  Yes its not very clean, but it will work.

 

Sessions are 100% server side, cookies are for the most part client side, some versions of apache have a key log of cookies that can be used similar to a md5 checksum on a file.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.