1
Colleagues,
I’m rephrasing my question. I have a client I need to integrate another site with. I’m using Curl for this. But instead of the user using the access of the other site, the integration would make the user when logging into our site, would have access to the content of his site, without needing to login again. I’m 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;
"If you are the application Owner, check your logs for Details." = > "If you are the application owner, check your logs for details"
– Bacco
There Bacco. The mistake I understood, but I need to know how to correct this error.
– user24136
This is not the error, this is a warning of where you have to look to know the error that is preventing the page from being displayed. And it is just by looking at us logs that you will find the exact reason for the problem. Whenever you are working with error output turned off, it is critical to see the logs (actually, it’s important to see the logs even with error display on).
– Bacco
Got it...I fixed it and it appeared now You are being redirected. Another thing, when I wrote "There" in my comment, was to be "Hello" rs rs rs rs rs.
– user24136
Figured out the problem? If so, you can post it as an answer (if you think it’s something that can happen to other users). If it’s just a syntax problem, or a very specific one, it might be best to just remove the doubt. See if it applies more to your problem. Answer the question itself is valid within the rules of the site, and even encouraged when the person resolves on their own.
– Bacco
I found nothing... I’m taking a beating with this.. rs rs.. Regarding the time, I put curl_setopt($ch, CURLOPT_TIMEOUT,0); and is directing correctly, but is giving error 404, only that the parameters are correct. I will redo my current code in the post.
– user24136