public static function json($url) {
        $opts = [
            'http' => [
                'method' => 'GET',
                'timeout' => 10
            ]
        ];
        $context = stream_context_create($opts);
        $feed = file_get_contents($url, false, $context);
        $json = json_decode($feed, true);

        return $json;
    }
public static function json($url) {
        $opts = [
            'http' => [
                'method' => 'GET',
                'timeout' => 10
            ]
        ];
        $context = stream_context_create($opts);
        $feed = file_get_contents($url, false, $context);
        $json = json_decode($feed, true);

        return $json;
    }
public static function json ( $ url ) { $ opts = [ 'http' => [ 'method' => 'GET' , 'timeout' => 10 ] ] ; $ context = stream_context_create ( $ opts ) ; $ feed = file_get_contents ( $ url , false , $ context ) ; $ json = json_decode ( $ feed , true ) ; return $ json ; }
Executes simple GET request to the CoinMarketCap public API.

@param string $url API method URL.

@return array JSON data.
Executes simple GET request to the CoinMarketCap public API .