I'm looking to display Json from a url (http://pastebin.com/raw.php?i=MSyA8CBZ). Then, I want the "steamid" to be displayed. Currently, I am using this code, but it's not working:
<?php
$json = file_get_contents('http://pastebin.com/raw.php?i=MSyA8CBZ');
$obj = json_decode($json);
echo $obj->response->players->steamid;
?>
I get the error: Fatal error: Cannot use object of type stdClass as array in /home/u434538987/public_html/testjson.php on line 4
What is wrong with my code?