Skip to content
PHP library to communicate with Oktawave Cloud Storage
Branch: master
Clone or download
bjackowski Merge pull request #9 from mmortek/fix/wrong-behaviour-downloadToFile
Fix wrong behaviour in downloadObjectToFile method
Latest commit 8cc59af Feb 2, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Oktawave/OCS Fix wrong behaviour in downloadObjectToFile method Apr 2, 2017

Oktawave - PHP OCS Client

php-ocsclient is a PHP library to communicate with Oktawave OCS.


Installing via Composer

The recommended way to install OCS Client is through Composer.

# Install Composer
curl -sS | php

# Add OCS Client dependency to your project
php composer.phar require oktawave/php-ocsclient:*

After installing, you need to require Composer's autoloader:


require_once 'vendor/autoload.php';

Standalone installation

  1. Download the neweset release
  2. Include initialization script in your code that loads all required classes

require_once 'path/to/ocs/ocs_init.php';


For all example cases of using client you should take a look at the example code from examples/OCSClient.php.


To use OCS you must authenticate your account.

// Create new OSC Client instance for "somebucket" bucket
$OCSClient = new Oktawave_OCS_OCSClient('somebucket');

// Authenticate your OCS user
$OCSClient->authenticate('account:user', 'pa$$w0rd');

Objects manipulation

// Upload single object
$url = $OCSClient->createObject('/path/to/file.txt', 'destination/path/file.txt');

// Download object
$fileContent = $OCSClient->downloadObject('destination/path/file.txt');

//  Get a list of all objects
$list = $OCSClient->listObjects();


Copyright (C) 2014 Oktawave Sp. z o.o. -

Released under GNU General Public License v3.0. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

You can’t perform that action at this time.