I am planning the introduction of an internet site that uses parked domain names to permit just one code base they are driving multiple locale versions of the website.

Things I are thinking about is, when my index page is loaded to question my database to ascertain if that one host title continues to be put into a whitened list using a bespoke administration system. If that's the case, the resultant row of site information (title, domain, locale etc.) is saved inside a session variable.

My real question is: basically did store this row within the session, would that session then be accessible to the many other "sites" too (which I'm not going)?

My ideas for storing these details within the session were and so i did not need to query my database on each page for that site particulars. But when periods are available by all parked domain names, I'm going to re-factor my authentication handler too as that utilizes periods (unrelated, I understand!).

Thanks ahead of time.

Periods usually depend on snacks, the browser is only going to send a cookie when the domain it had been set from matches the domain from the assets you're asking for. So even when you are utilizing the same code for your various domain names as lengthy as that code has been recommended by different Web addresses you'll be fine.

There´s a method to make session acessible to any or all parked domain names and sub-domain names. I´m searching for a solution, and that i didn´t found... However I authored some code thats resolved this problem:

session_set_cookie_params(,"/",$_SERVER["SERVER_Title"])

$_SESSION['session.cookie_domain'] = $_SERVER["SERVER_Title"]

Best Of Luck for those future finders!