Created
March 6, 2013 01:22
-
-
Save whyisjake/5095956 to your computer and use it in GitHub Desktop.
Having issues getting all of the parts data from the Make: Projects API. Should be getting the type, and quantity from the response. Not seeing it here.
This file contains 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 | |
/** | |
* Trying to grab the parts quantity and the type, but they are missing. | |
* Check this page: http://makeprojects.com/api/0.1/guide/56 and note the parts array. | |
*/ | |
header('Content-Type: text/html; charset=utf-8'); | |
$url = 'http://makeprojects.com/api/0.1/guide/56'; | |
$contents = file_get_contents( $url ); | |
//echo $contents; | |
$json = json_decode($contents); | |
//print_r($json); | |
$parts = $json->guide->parts; | |
print_r($parts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment