Alan Edwardes

Using Amazon S3 with your PHP Apps

There is a neat little PHP 5 class written by Donovan Schönknecht that allows you to access and manage both your Amazon S3 and CloudFront distributions right from your PHP scripts, allowing distributed file access without the need for manual intervention.

I know it's how the service is meant to be accessed in the first place, and this script is one of the better additions to the growing number of S3 access methods popping up over the internet.

To use it on a basic level:

require_once 'S3.php';
$s3 = new S3('accessKey','secretKey');
$s3->putObjectFile('test.txt','bucket','test.txt',S3::ACL_PUBLIC_READ);

(Assuming text.txt is a file in the same directory as that script, along with the class.)

Neat and fast :)

01st of July 2009 at 4:53 PM

2 years, 10 months ago

written by Alan Edwardes.

114 words

rand: A Website Guide For Dummies

next: Benching With SunSpider

prev: CloudBerry Explorer Free

share:FacebookTwitterRedditdiggStumbleUpondeliciousHacker NewsLinkedIn

Add a Comment

© 2006 – 2012 Alan Edwardes / code on github
Top