I am no coder at all. Started learning html and php and bumped into a problem. There a few similar questions, but with my skill, I am not able to implement solutions.
$url = "https://www.bitstamp.net/api/ticker/";
$fgc = file_get_contents($url);
$json = json_decode($fgc, true);
$price = $json["last"];
$high = $json["high"];
$low = $json["low"];
$date = date("m-d-Y - h:i:sa");
$open = $json["open"];
After launching XAMPP on my machine and uploading php file, I get returned:
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /opt/lampp/htdocs/crypto_ticker/api.php on line 5
Warning: file_get_contents(https://www.bitstamp.net/api/ticker/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /opt/lampp/htdocs/crypto_ticker/api.php on line 5
Would someone please let me know what does that mean? Inability to connect to the page? The page loads itself perfectly fine, so must be something missing on my side. And what do I do then? Thank you in advance