Hi All,

I am integrating two websites with one login. One website is done in Core PHP(movies website) and the other one is SocialEngine(Zend, Social Networking Site). For both websites database is same. Now i want to login from movie website and should be able to use Social Networking Website aslo.

I started using CURL for this process. With below code i am able to login with same credentials and i am getting home page of my SocialNetworking Site. Problem is, when i click on any other link relating to SocialNetworking site, it's taking back to Login for that site. But still i am active in Movie Website.

PHP Code:
$random rand(10,100000000000000000);
$id "user"
$pw "user"

$fields = array('email'=>$id'password'=>$pw,'return_url'=>"64-L3NlL2luZGV4LnBocC9ncm91cHM=");

$ch curl_init(); 
curl_setopt($ch,    CURLOPT_COOKIESESSION,         true); 
curl_setopt($chCURLOPT_FOLLOWLOCATION1); // Allow redirection 

How can i save session for total website with CURl? Is this way correct or is thr any other way to do this?