floridaflatlander Posted May 9, 2012 Share Posted May 9, 2012 I know this has been asked before and I have searched but I can't find an answer. I have a cookie that is set on a customers web site(yes I've tested it and it is defined) and I was going to use it to display certain info on my web site. Sooo ... How do I get a cookie to work across multiple (2) web sites? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/262314-how-do-i-get-a-cookie-to-work-across-multiple-2-web-sites/ Share on other sites More sharing options...
premiso Posted May 9, 2012 Share Posted May 9, 2012 You cannot. The best you can do is pass a hash from Site A to Site B that authenticates the user, IE a token like system. This would also mean that Site A and Site B have to be able to talk to each other to authenticate the user in some way and have methods to validate the token. Quote Link to comment https://forums.phpfreaks.com/topic/262314-how-do-i-get-a-cookie-to-work-across-multiple-2-web-sites/#findComment-1344293 Share on other sites More sharing options...
floridaflatlander Posted May 9, 2012 Author Share Posted May 9, 2012 Thanks, I just read that somewhere else too. I may use a db table. As an example, how does one site on the internet know I was looking at motorcycles on another web site?(this has happened to me) Quote Link to comment https://forums.phpfreaks.com/topic/262314-how-do-i-get-a-cookie-to-work-across-multiple-2-web-sites/#findComment-1344296 Share on other sites More sharing options...
floridaflatlander Posted May 9, 2012 Author Share Posted May 9, 2012 Okay I was reading about third party cookies, that's not what I want, I think I'll go the db route. Thanks again premiso Quote Link to comment https://forums.phpfreaks.com/topic/262314-how-do-i-get-a-cookie-to-work-across-multiple-2-web-sites/#findComment-1344299 Share on other sites More sharing options...
kicken Posted May 9, 2012 Share Posted May 9, 2012 As an example, how does one site on the internet know I was looking at motorcycles on another web site?(this has happened to me) I assume your talking about the advertisements. This is because the ad companies have their own cookies associated with their banner ads which are all served up from their own domain. Whenever they serve up an ad they can look at the cookie and determine your preferences from that. They will get some idea of what you are looking for because when they have their clients include the code for ads on their pages, there is an ID of some sort to identify the client which is categorized on their end into a bunch of groups (like phpfreaks would be put into a computers, technology, program, probably more groups). So whenever you end up loading one of their ads they can see what type of site your on and associate that with the cookie value you have. Then next time and ad is loaded they take into account the past views based on the cookie id to serve up an ad related to what you've been looking at. Quote Link to comment https://forums.phpfreaks.com/topic/262314-how-do-i-get-a-cookie-to-work-across-multiple-2-web-sites/#findComment-1344300 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.