/ Published in: PHP
Expand |
Embed | Plain Text
$cache_file = "/path/to/cache_file.htm"; $force_update = false; $username = "YOUR_USER_NAME"; $api_key = "YOUR_API_KEY"; $url = "http://ws.audioscrobbler.com/2.0/?format=json&method=user.getrecenttracks&"; $url .= "user=" . $username . "&api_key=" . $api_key; $data = @curlContents($url); $data = @json_decode($data, true); foreach ($data['recenttracks']['track'] as $track) { } } file_put_contents($cache_file, $contents); } else { } echo $contents;
You need to login to post a comment.
