Created
October 19, 2013 02:51
-
-
Save enkrates/7051151 to your computer and use it in GitHub Desktop.
A very simple bit of PHP to follow a coding challenge.
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 | |
$url = 'http://letsrevolutionizetesting.com/challenge?id=756775492'; | |
do { | |
echo "following the json\n"; | |
$json = file_get_contents($url . '&format=json'); | |
$data = json_decode($json); | |
$url = isset($data->follow) ? $data->follow : NULL; | |
} while ( isset($data->follow) ); | |
var_dump($data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment