PHP code example of noweh / laravel-soundcloud

1. Go to this page and download the library: Download noweh/laravel-soundcloud library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

noweh / laravel-soundcloud example snippets


return redirect(\Soundcloud::getAuthorizeUrl('a_custom_param_to_retrieve_in_callback'));

try {
    $tracks = [];
    $params = ['linked_partitioning' => true, 'limit' => 100 ];
    $response = \Soundcloud::get('users/{CLIENT_ID}/tracks', $params);
    while (property_exists($response, 'next_href') && !empty($response->next_href)) {
        $tracks = array_merge($tracks,$response->collection);
        $response = \Soundcloud::get($response->next_href);
    }
} catch (Exit $e) {
    exit($e->getMessage());
}