Colleagues,
I'm rephrasing my question. I have a client that I need to integrate with another site by his. I'm using the curl for this. But instead of using the access of the other site, the integration would make the user to log in to our site, would have access to the content of his site, without having to log in again. I am using the following command:
// Inicia o cURL
$ch = curl_init();
// Define a URL original (do formulário de login)
$campos = array("login"=>$jmUsuario->email,"classroom_id"=>$jmUsuario->email,"sign"=>$sign);
$parametros = json_encode($campos);
curl_setopt($ch, CURLOPT_URL, 'http://www.siteX.com.br/api/auth/');
curl_setopt($ch, CURLOPT_POSTFIELDS, $parametros);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,0);
curl_setopt($ch, CURLOPT_POST, 0);
$content = curl_exec($ch);
//$response = curl_getinfo($ch, CURLINFO_HTTP_CODE);
echo $content;