Ben Sinclair wrote:

>I want to retain some data across my sites, which have different domain names.
>I can't use cookies because they rely on the domain name, and I'd rather not
>pass the information on every link Any suggestions?
I've been thinking about this recently and here's what I came up with:

Have a domain or subdomain dedicated souly to user sessions, for 

Whenever a user visits a page on ANY of your domains ( 
in this example), check if they have a cookie set. If they don't:
1. Create a session for that user with a unique session ID
2. Send them a page which includes a single pixel gif image looking like 
width=1 height=1>
( Remember - has access to ALL cookies set for )
3. CHECKS to see if this user has a cookie set. 
If they DO then they are already
    known to - records the 
fact that this user is logged on to as zs9s0a8fs6fudisdfsf8dfdfsfs in a shared database.
4. If does NOT find a cookie then it means this 
is a new user who is not "known" to the system yet. creates a cookie recording the user, and 
notes that the user is also logged in to with
    whatever session ID was set over there.

This is all pretty complicated but the end result is that the domain knows about every user, and a shared 
database (accessible by all of your domains) maintains a record of each 
unique user (as according to the cookie) and what 
their session is for each of the different domains.

Final note: needs to actually 
send a pixel to the client browser - this can be done with the following 
code in the zend code library:



PHP General Mailing List (
To unsubscribe, visit:

Reply via email to