I'm trying to get the data from this Api call with the Github Api. However whenever I try and get the data from it I get the below error. I cannot seem to figure out why this isn't working.
I'm running it on a localhost through PhpStorm.
Code:
$url = urlencode("https://api.github.com/users/devinmatte/repos");
$json = file_get_contents($url);
$obj = json_decode($json);
echo $obj;
Error:
[Sat Mar 25 20:02:14 2017] PHP Warning: file_get_contents(https%3A%2F%2Fapi.github.com%2Fusers%2Fdevinmatte%2Frepos): failed to open stream: No such file or directory in /home/devin-matte/Documents/Git-Challenge/index.php on line 13