Send sessions to subdomain with ajax? -


i want create mobile version of website , process sending request main website , result design mobile.but need each user differently thats why need user id access on sub domain or domains releted ex.com searched , found

header('access-control-allow-origin:  '.$_server['http_origin']); $some_name  = session_name("some_name"); session_set_cookie_params(0, '/', '.example.com'); session_start(); echo('id=',$_session['user']['id']); 

it works different opened tabs.for example 1 tab show www.ex.com show m.ex.com sessions same(if session id 12 on www.ex.com means on m.ex.com session id 12) when send request ajax(jquery) doesnt work echo this:'id='


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -