array( 'name' => 'username', 'required' => true ) )); const CLIENT_ID = '4jkoEFmZEDaqjwJ9Eih4ATNhcH3vMVfp'; public function collectData(){ $res = json_decode(getContents( 'https://api.soundcloud.com/resolve?url=http://www.soundcloud.com/' . urlencode($this->getInput('u')) . '&client_id=' . self::CLIENT_ID )) or returnServerError('No results for this query'); $tracks = json_decode(getContents( 'https://api.soundcloud.com/users/' . urlencode($res->id) . '/tracks?client_id=' . self::CLIENT_ID )) or returnServerError('No results for this user'); for($i = 0; $i < 10; $i++) { $item = array(); $item['author'] = $tracks[$i]->user->username . ' - ' . $tracks[$i]->title; $item['title'] = $tracks[$i]->user->username . ' - ' . $tracks[$i]->title; $item['content'] = '