General developer forum

stream_context_create & session_satrt()

 
Picture of A. Obeid
Re: stream_context_create & session_satrt()
Particularly helpful Moodlers

Solved with "curl"

 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, $url);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, "client_id=" . CLIENT_ID . "&scope=scope_name&return_url=".$return_url);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
 $result = curl_exec($ch);

 
Average of ratings: -