If two top-level domain names in the same program share cookies

Source: Internet
Author: User
If two top-level domain names in the same program share cookies, this post is Last edited by liaohongchu from 2013-01-22:22:59, for example: www.xinqq163.com & nbsp; tm.xinqq163.com; & nbsp; if two top-level domain names in the same program share cookies
This post was last edited by liaohongchu at 17:22:59, for example: www.xinqq163.com tm.xinqq163.com

However, tm.xinqq163.com becomes a separate domain name for access from www.tm.com.

But the COOKIE cannot be shared. how can I write it to access it?

Original
Www.xinqq163.com tm.xinqq163.com is the code for sharing cookies:

$ Pai_domain_cookie = ".xinqq163.com ";
Function PutCookie ($ key, $ value, $ kptime = 0, $ pa = "/")
{
Global $ pai_cookie_encode, $ pai_domain_cookie;
Setcookie ($ key, $ value, time () + $ kptime, $ pa, $ pai_domain_cookie );
Setcookie ($ key. '_ ckmd5', substr (md5 ($ pai_cookie_encode. $ value),), time () + $ kptime, $ pa, $ pai_domain_cookie );


}
------ Solution --------------------
Good resources vomit blood recommended: http://download.csdn.net/detail/shw340518/5019519

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.