2017 © Pedro Peláez
 

library amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5.2.x using CURL that does not require PEAR.

image

tpyo/amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5.2.x using CURL that does not require PEAR.

  • Monday, August 1, 2016
  • by tpyo
  • Repository
  • 94 Watchers
  • 916 Stars
  • 310,083 Installations
  • PHP
  • 11 Dependents
  • 0 Suggesters
  • 360 Forks
  • 63 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

Amazon S3 PHP Class

Usage

OO method (e,g; $s3->getObject(...)):, (*1)

$s3 = new S3($awsAccessKey, $awsSecretKey);

Statically (e,g; S3::getObject(...)):, (*2)

S3::setAuth($awsAccessKey, $awsSecretKey);

Object Operations

Uploading objects

Put an object from a file:, (*3)

S3::putObject(S3::inputFile($file, false), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)

Put an object from a string and set its Content-Type:, (*4)

S3::putObject($string, $bucketName, $uploadName, S3::ACL_PUBLIC_READ, array(), array('Content-Type' => 'text/plain'))

Put an object from a resource (buffer/file size is required - note: the resource will be fclose()'d automatically):, (*5)

S3::putObject(S3::inputResource(fopen($file, 'rb'), filesize($file)), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)

Retrieving objects

Get an object:, (*6)

S3::getObject($bucketName, $uploadName)

Save an object to file:, (*7)

S3::getObject($bucketName, $uploadName, $saveName)

Save an object to a resource of any type:, (*8)

S3::getObject($bucketName, $uploadName, fopen('savefile.txt', 'wb'))

Copying and deleting objects

Copy an object:, (*9)

S3::copyObject($srcBucket, $srcName, $bucketName, $saveName, $metaHeaders = array(), $requestHeaders = array())

Delete an object:, (*10)

S3::deleteObject($bucketName, $uploadName)

Bucket Operations

Get a list of buckets:, (*11)

S3::listBuckets()  // Simple bucket list
S3::listBuckets(true)  // Detailed bucket list

Create a bucket:, (*12)

S3::putBucket($bucketName)

Get the contents of a bucket:, (*13)

S3::getBucket($bucketName)

Delete an empty bucket:, (*14)

S3::deleteBucket($bucketName)

The Versions

01/08 2016

dev-master

9999999-dev https://github.com/tpyo/amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5.2.x using CURL that does not require PEAR.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.2.0

 

by Donovan Schönknecht

27/04 2015

v0.5.1

0.5.1.0 https://github.com/tpyo/amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5.2.x using CURL that does not require PEAR.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.2.0

 

by Donovan Schönknecht

04/03 2014

dev-fix/safemode-redirect

dev-fix/safemode-redirect https://github.com/tpyo/amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5.2.x using CURL that does not require PEAR.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.2.0

 

by Donovan Schönknecht

05/10 2013

v0.5.0

0.5.0.0 https://github.com/tpyo/amazon-s3-php-class

A standalone Amazon S3 (REST) client for PHP 5.2.x using CURL that does not require PEAR.

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.2.0

 

by Donovan Schönknecht