Skip to content

MilkyC/PHP-Amazon-S3-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

php-amazon-s3-helper

A simple wrapper for the S3 library amazon-s3-php-class

Requirements

You have to have the Amazon S3 PHP Class included in your path somewhere. This class relies on that library being there!

Usage

Instantiate a new object with your aws key and secret:

$amazonObj = new AmazonHelper($awsAccessKey, $awsSecretKey);

And then you can retrieve items from S3

$obj = $amazonObj->getFile($bucketname, $path, $localPath);

And put them there:

$res = $amazonObj->putFile(array("file"=>$fileName), $bucketname, $name_on_s3);

It can also list all the values in a given bucket:

$buck_contents = $amazonObj->getBucketContents($bucketname);

Enjoy,

--Charlie

About

PHP Amazon S3 Helper Class

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages