Closed radaniba closed 10 years ago
What's on line 32?
It is the file_get_content
function, and I actually solved it by adding this to the Github provider code
$options = array('http' => array('user_agent'=> $_SERVER['HTTP_USER_AGENT']));
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
by adding a user agent to the options, file_get_content
is now working, same thing if it was with cURL
method.
Thanks :)
Adding the user agent fixed an issue that I was having on an unrelated project.
I am trying to use oauth2 with Github api but I am keeping having this message
Any idea on how to solve that problem ? I tried cURL to but it is giving an empty array. That said when I copy paste the url on the browser I get all the information
Cheers