Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_get_contents does not work on all hosts #9

Open
raytiley opened this issue Jan 26, 2018 · 0 comments
Open

file_get_contents does not work on all hosts #9

raytiley opened this issue Jan 26, 2018 · 0 comments

Comments

@raytiley
Copy link
Member

Debugging for someone found their host returned an empty string for file_get_contents. Using curl on there system seemed to work:

Example here: https://stackoverflow.com/a/15617547/160381

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, 'url_here');
$result = curl_exec($ch);
curl_close($ch);

$obj = json_decode($result);
echo $obj->access_token;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant