PHPackages                             keekinc/s3-client - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. keekinc/s3-client

ActiveLibrary[File &amp; Storage](/categories/file-storage)

keekinc/s3-client
=================

A fork off of the S3 Client that supports V2 Signatures

1.0.11(9y ago)16GPLv3+PHPPHP &gt;=5.3.0

Since Mar 28Pushed 9y ago1 watchersCompare

[ Source](https://github.com/wleona3/s3-client)[ Packagist](https://packagist.org/packages/keekinc/s3-client)[ RSS](/packages/keekinc-s3-client/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (13)Used By (0)

Keek's Amazon S3 Connector
==========================

[](#keeks-amazon-s3-connector)

A lightweight Amazon S3 connector implementation for PHP 5.3 or later

**Special Thanks To:** [akeeba/s3](https://github.com/akeeba/s3) for the Original Fork.

After having a lot of impossible to debug problems with Amazon's Guzzle-based AWS SDK we decided to roll our own connector for Amazon S3. This is by no means a complete implementation, just a small subset of S3's features which are required by our software. The design goals are simplicity and low memory footprint.

This code is loosely based on S3.php written by Donovan Schonknecht and available at  under a BSD-like license. This repository no longer reflects the original author's work and should not be confused with it.

This software is distributed under the GNU General Public License version 3 or, at your option, any later version published by the Free Software Foundation (FSF). In short, it's "GPLv3+".

Using the connector
-------------------

[](#using-the-connector)

### Get a connector object

[](#get-a-connector-object)

```
$configuration = new Configuration(
	'YourAmazonAccessKey',
	'YourAmazonSecretKey'
);

$connector = new Connector($configuration);
```

### Listing buckets

[](#listing-buckets)

```
$listing = $connector->listBuckets(true);
```

Returns an array like this:

```
array(2) {
  'owner' =>
  array(2) {
    'id' =>
    string(64) "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
    'name' =>
    string(8) "someUserName"
  }
  'buckets' =>
  array(3) {
    [0] =>
    array(2) {
      'name' =>
      string(10) "mybucket"
      'time' =>
      int(1267730711)
    }
    [1] =>
    array(2) {
      'name' =>
      string(10) "anotherbucket"
      'time' =>
      int(1269516249)
    }
    [2] =>
    array(2) {
      'name' =>
      string(11) "differentbucket"
      'time' =>
      int(1354458048)
    }
  }
}

```

### Listing bucket contents

[](#listing-bucket-contents)

```
$listing = $connector->getBucket('mybucket', 'path/to/list/');
```

If you want to list "subdirectories" you need to do

```
$listing = $connector->getBucket('mybucket', 'path/to/list/', null, null, '/', true);
```

The last parameter (common prefixes) controls the listing of "subdirectories"

### Uploading (small) files

[](#uploading-small-files)

From a file:

```
$input = Input::createFromFile($sourceFile);
$connector->putObject($input, 'mybucket', 'path/to/myfile.txt');
```

From a string:

```
$input = Input::createFromData($sourceString);
$connector->putObject($input, 'mybucket', 'path/to/myfile.txt');
```

From a stream resource:

```
$input = Input::createFromResource($streamHandle, false);
$connector->putObject($input, 'mybucket', 'path/to/myfile.txt');
```

In all cases the entirety of the file has to be loaded in memory.

### Uploading large file with multipart (chunked) uploads

[](#uploading-large-file-with-multipart-chunked-uploads)

Files are uploaded in 5Mb chunks.

```
$input = Input::createFromFile($sourceFile);
$uploadId = $connector->startMultipart($input, 'mybucket', 'mypath/movie.mov');

$eTags = array();
$eTag = null;
$partNumber = 0;

do
{
	// IMPORTANT: You MUST create the input afresh before each uploadMultipart call
	$input = Input::createFromFile($sourceFile);
	$input->setUploadID($uploadId);
	$input->setPartNumber(++$partNumber);

	$eTag = $connector->uploadMultipart($input, 'mybucket', 'mypath/movie.mov');

	if (!is_null($eTag))
	{
		$eTags[] = $eTag;
	}
}
while (!is_null($eTag));

// IMPORTANT: You MUST create the input afresh before finalising the multipart upload
$input = Input::createFromFile($sourceFile);
$input->setUploadID($uploadId);
$input->setEtags($eTags);

$connector->finalizeMultipart($input, 'mybucket', 'mypath/movie.mov');
```

As long as you keep track of the UploadId, PartNumber and ETags you can have each uploadMultipart call in a separate page load to prevent timeouts.

### Get presigned URLs

[](#get-presigned-urls)

Allows browsers to download files directly without exposing your credentials and without going through your server:

```
$preSignedURL = $connector->getAuthenticatedURL('mybucket', 'path/to/file.jpg', 60);
```

The last parameter controls how many seconds into the future this URL will be valid.

### Download

[](#download)

To a file with absolute path `$targetFile`

```
$connector->getObject('mybucket', 'path/to/file.jpg', $targetFile);
```

To a string

```
$content = $connector->getObject('mybucket', 'path/to/file.jpg', false);
```

### Delete an object

[](#delete-an-object)

```
$connector->deleteObject('mybucket', 'path/to/file.jpg');
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Recently: every ~22 days

Total

12

Last Release

3606d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.6.0

1.0.8PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b76f98dede255dab7aaa46677f8d6e39f384263c629f7134f1875572728496cf?d=identicon)[s01d](/maintainers/s01d)

---

Top Contributors

[![madrobot](https://avatars.githubusercontent.com/u/9037816?v=4)](https://github.com/madrobot "madrobot (14 commits)")

### Embed Badge

![Health badge](/badges/keekinc-s3-client/health.svg)

```
[![Health](https://phpackages.com/badges/keekinc-s3-client/health.svg)](https://phpackages.com/packages/keekinc-s3-client)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
