I can not get the data of a certain API can anyone help me? I've tried it in several ways. the error you are giving is:
Notice: Trying to get property of non-object in C: \ xampp \ htdocs \ test \ index.php on line 7
<?php
$api=file_get_contents("https://api.bf4stats.com/api/playerInfo?plat=pc&name=1ApRiL&output=js");
$defuse=json_decode($api);
echo $defuse->player->name;
?>