How can I parse JSON data from an API call?

Here’s what I have at the moment:

<?php
    $string = file_get_contents("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=8A0E0F3D4304203DC84FF77C3E9FF8CC&steamids=76561198040884950");
    $json=json_decode($string);
?>

<script type="text/javascript">
        alert("<?php echo $json; ?>");
</script>

All I’m trying to do at this stage is receive the JSON information. I’m quite new to jQuery and PHP so not sure where I’m going wrong.

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories