Giter Club home page Giter Club logo

s3-php5-curl's Introduction

AMAZON S3 PHP CLASS

This is a branch of the original amazon-s3-php-class found on google code (http://code.google.com/p/amazon-s3-php-class/). I've included my changes to include invalidation support.

USING THE CLASS

OO method (e,g; $s3->getObject(...)):
$s3 = new S3(awsAccessKey, awsSecretKey);

Statically (e,g; S3::getObject(...)):
S3::setAuth(awsAccessKey, awsSecretKey);


For class documentation see:
http://undesigned.org.za/files/s3-class-documentation/index.html


OBJECTS


Put an object from a string:
	$s3->putObject($string, $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
	Legacy function: $s3->putObjectString($string, $bucketName, $uploadName, S3::ACL_PUBLIC_READ)


Put an object from a file:
	$s3->putObject($s3->inputFile($file, false), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)
	Legacy function: $s3->putObjectFile($uploadFile, $bucketName, $uploadName, S3::ACL_PUBLIC_READ)


Put an object from a resource (buffer/file size is required):
	Please note: the resource will be fclose()'d automatically
	$s3->putObject($s3->inputResource(fopen($file, 'rb'), filesize($file)), $bucketName, $uploadName, S3::ACL_PUBLIC_READ)


Get an object:
	$s3->getObject($bucketName, $uploadName)


Save an object to file:
	$s3->getObject($bucketName, $uploadName, $saveName)


Save an object to a resource of any type:
	$s3->getObject($bucketName, $uploadName, fopen('savefile.txt', 'wb'))


Copy an object:
	$s3->copyObject($srcBucket, $srcName, $bucketName, $saveName, $metaHeaders = array(), $requestHeaders = array())


Delete an object:
	$s3->deleteObject($bucketName, $uploadName)

BUCKETS


Get a list of buckets:
	$s3->listBuckets()  // Simple bucket list
	$s3->listBuckets(true)  // Detailed bucket list


Create a public-read bucket:
	$s3->putBucket($bucketName, S3::ACL_PUBLIC_READ)
	$s3->putBucket($bucketName, S3::ACL_PUBLIC_READ, 'EU') // EU-hosted bucket


Get the contents of a bucket:
	$s3->getBucket($bucketName)


Get a bucket's location:
	$s3->getBucketLocation($bucketName)


Delete a bucket:
	$s3->deleteBucket($bucketName)


INVALIDATE

Invalidate a path:
	$s3->invalidate($distributionId, $path);

KNOWN ISSUES

	Files larger than 2GB are not supported on 32 bit systems due to PHP’s signed integer problem



MORE INFORMATION


	Project URL:
	http://undesigned.org.za/2007/10/22/amazon-s3-php-class

	Class documentation:
	http://undesigned.org.za/files/s3-class-documentation/index.html

	Bug reports:
	http://code.google.com/p/amazon-s3-php-class/issues/entry

	Amazon S3 documentation:
	http://docs.amazonwebservices.com/AmazonS3/2006-03-01/




EOF!

s3-php5-curl's People

Contributors

julesbravo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

t-web aklein26

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.