2017 © Pedro Peláez
 

library amazon-s3-php-namespace

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

image

eben-hk/amazon-s3-php-namespace

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

  • Monday, April 4, 2016
  • by eben-hk
  • Repository
  • 1 Watchers
  • 0 Stars
  • 172 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 26 % 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

04/04 2016

dev-master

9999999-dev https://github.com/eben-hk/amazon-s3-php-namespace

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

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.2.0

 

by Eben Katilik

04/04 2016

1.0.0

1.0.0.0 https://github.com/eben-hk/amazon-s3-php-namespace

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

  Sources   Download

BSD-2-Clause

The Requires

  • php >=5.2.0

 

by Eben Katilik