PHPackages                             ise/php-soundcloud - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ise/php-soundcloud

AbandonedArchivedLibrary[API Development](/categories/api)

ise/php-soundcloud
==================

API Wrapper for SoundCloud written in PHP with support for authentication using OAuth 2.0 by Anton Lindqvist (mptre), composer support added by Gary Lockett (ise)

3.0.1(12y ago)7100.8k↓33.3%3[6 issues](https://github.com/internalsystemerror/php-soundcloud/issues)MITPHPPHP &gt;=5.3

Since Feb 5Pushed 4y ago1 watchersCompare

[ Source](https://github.com/internalsystemerror/php-soundcloud)[ Packagist](https://packagist.org/packages/ise/php-soundcloud)[ Docs](https://github.com/internalsystemerror/php-soundcloud)[ RSS](/packages/ise-php-soundcloud/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

SoundCloud PHP API Wrapper
==========================

[](#soundcloud-php-api-wrapper)

Introduction
------------

[](#introduction)

A wrapper for the SoundCloud API written in PHP with support for authentication using [OAuth 2.0](http://oauth.net/2/).

The wrapper got a real overhaul with version 2.0. The current version was written with [PEAR](http://pear.php.net/) in mind and can easily by distributed as a PEAR package.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.0.0 (with [cURL](http://se2.php.net/curl) support)

Getting started
---------------

[](#getting-started)

Check out the [getting started](https://github.com/mptre/php-soundcloud/wiki/OAuth-2) wiki entry for further reference on how to get started. Also make sure to check out the [demo application](https://github.com/mptre/ci-soundcloud) for some example code.

Composer
--------

[](#composer)

A version of the library that is PSR-4 compliant and installable via Composer is available on the psr-4 branch. To include it in your projects, include the following in your `composer.json` file:

```
{
    "repositories": [
        {
            "type": "git",
            "url": "https://github.com/mptre/php-soundcloud"
        }
    ],
    "require": {
        "glenscott/soundcloud": "dev-psr-4"
    }
}

```

The Composer-version of the libray requires PHP &gt;= 5.3 because of the use of namespaces.

The namespaced class names differ from the examples below. For example, to create a new client object with app credentials, instead of:

```
$client = new Services_Soundcloud(
  'CLIENT_ID', 'CLIENT_SECRET', 'REDIRECT_URL');

```

Instead, use:

```
$client = new SoundCloud\Client(
    'CLIENT_ID',
    'CLIENT_SECRET',
    'REDIRECT_URL'
);

```

Examples
--------

[](#examples)

The wrapper includes convenient methods used to perform HTTP requests on behalf of the authenticated user. Below you'll find a few quick examples.

Of course, you need to handle the authentication first before being able to request and modify protected resources as demonstrated below. Therefore, I refer to the [demo application](https://github.com/mptre/ci-soundcloud) which has some example code on how to handle authentication.

### GET

[](#get)

```
