I did this once, and it was between the PHP site and the ASP.NET site (I am an ASP.NET developer, but also know some snippets about PHP).
App1 (), App1 , (, GUID). App2 (, ). , JohnDoe App1.
App1 (3l3kjlk3j4lkj34, JohnDoe) App2 - (, HTTP URL-, www.app2.com/SetTempKey.aspx?userId=JohnDoe&key=3l3kjlk3j4lkj34 - , IP- ).
App2 . , App2 www.app2.com/login.aspx.
1 www.app2.com/login.aspx?tempKey=3l3kjlk3j4lkj34 , " 2". , login.aspx app2. querystring tempKey, , 2, , - JohnDoe.
App2 , FormsAuthentication.RedirectFromLoginPage( "JohnDoe", true) ( , , cookie /not _session_lived).
... .