Answer the question
In order to leave comments, you need to log in
How to output certain data from json based on true & false parameters?
I extract the data in this way
<?php
$str = file_get_contents ('https://localhost/api.php?ip=127.0.0.1&port=12666'');
$playersonline = json_decode( $str );
echo "<span>";
echo $playersonline->players->now;
echo "</span> игроков";
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question