PHP single sign-on problem, new people ask for help to learn PHP for a week, the upper layer of the company to give me a single sign-on function of PHP, ask experts for help, try to give me some source code problems: www.a.com (a java program) has implemented the single-point logon function for the site www. B .com (PHP code is DZX2). now, you need to use www. B .com (PHP code for PHP single-point logon, newcomers seek help
I learned PHP for a week. The company's top layer gave me a single sign-on function for PHP. please help me with some source code as much as possible.
Question: www.a.com (a java program) has implemented the single-point logon function for www. B .com (PHP code, DZ X2 code) sites;
Now we need to use the single sign-on function for logging on to www.a.com (written in PHP, that is, the DZ X2 code) with www. B .com (written in JAVA ).
At present, I have Baidu and Google, but many of them do not understand
In addition, I used some things on the DZ forum, but how to write the SESSION and COOKIE of the www.a.com website (the user logon of WWW. A. COM is saved by SESSION and COOKIE)
SESSION:
Session_start ();
$ _ SESSION [name] = value;
------ Solution --------------------
The two sites share memcache and the session is saved.
------ Solution --------------------
Discussion
Well, I don't know what I said upstairs; I am now a JAVA program that can achieve one-way login to the PHP Forum; but how can I achieve one-way login to the JAVA program using PHP, this is the problem. find the source code.
------ Solution --------------------
The data to be transmitted through bidirectional encryption is decrypted after it is passed. if the information is correctly set to the login status.
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.