Witam
Chciałbym pobrać dane z API: https://ucp.paradise-rpg.pl/api/group/637 i nie do końca wiem jak się za to zabrać aby wyświetlić te dane z tablicy. Napisałby ktoś taki skrypt który wyświetli te dane?
$opts = [ "http" => [ "method" => "GET", "header" => "Accept-language: en\r\n" . "User-Agent: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-1 ] ]; $context = stream_context_create($opts); $res = file_get_contents($url, false, $context); $data = json_decode($res, true); print_r($data);
<?php $url = "https://ucp.paradise-rpg.pl/api/group/500"; $opts = [ "http" => [ "method" => "GET", "header" => "Accept-language: en\r\n" . "User-Agent: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-1" ] ]; $data = json_decode($res, true); ?>