Created
February 28, 2014 15:03
-
-
Save mess110/9272627 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // keep lines shorter than 80 columns. it makes it easier to read | |
| $url = 'http://coinmarketcap.northpole.ro/api/doge.json'; | |
| $data = json_decode(file_get_contents($url)); | |
| // try and comment out this method. see what it does. google it a bit | |
| // an alternative to var_dump is print_r (bonus points if you tell me the diff) | |
| // var_dump($data); | |
| $price = $data->{'price'}; | |
| echo $price; | |
| // some homework for you | |
| // how do you get the totalSupply? | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment