/    Sign up×
Community /Pin to ProfileBookmark

Two websites – sharing cookies

I have two websites (two domain names). Both are hosted on the same server.

I was wondering how I might share cookies between the two sites, along the lines of:

site 1 – has the cookies
site 2 – calls site 1 to read the cookie, site 1 sends the cookie info to site 2

Is this possible? What direction should I look towards to make this happen?

Thanks in advance!

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@felgallSep 18.2006 — The only way to do that is to link something into the page from the other domain and put the cookie processing code into that part of the page so that all cookie processing is done on the same domain.

Note that processing of cookies on domains other than the one that the main page is processing from are called third party cookies and most people have disabled them in their browser because they are mainly used by advertising companies to track all of the sites that you visit where they display their ads.
×

Success!

Help @ilbonparaurti spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...