PHP Multisite Login
I have been trying to get a multisite login system working. For example, a user goes to site1.com, logs in using login.site1.com, and is logged in on site2.com as well. I have tried cookies, but site2.com cant access site1.com cookies. I'm stuck with sessions, which I can't figure out, when I pass the session id through the url, I get a session id too long error. I've read that you can use mysql to do that, but how would you do that?
Sessions won't help you either, at least not by themselves.
The only thing you can do for multisite logins is to have ownership of both sites, and either share a database or have one site query another for information through something like soap or rest or whatever. Cookies cannot be shared between two sites (although they can be shared with subdomains). When the request is received which will need to use the GET for the phpsessid, than it should process it per normal on either site. If they share the same filesystem or database, then you can use the session information on either site.
you need to use a database that both sites could access
a bit of ajax should sort out the cross site bit