writeHeader(); ?>

s3u

A command-line PHP utility for mucking with the Amazon S3 service.

Source: s3u.phps

Candy-colored source: s3u.phps.html

See my wiki article for more information on S3.

The utility is pretty raw. It's intended for showing how to interact with the S3 service, and what the requests and responses look like. Have fun exploring!

Setup:

Usage

Get help

s3u.phps ?

List your buckets

./s3u.phps lsbuckets

Create a bucket named 'org.muellerware.testing'

./s3u.phps mkbucket org.muellerware.testing

Read the contents of bucket 'org.muellerware.testing'

./s3u.phps lsbucket org.muellerware.testing

Delete the bucket 'org.muellerware.testing'

./s3u.phps rmbucket org.muellerware.testing 

Create an object named 'a/a.html' in bucket 'org.muellerware.testing' with the contents of file 'data/a/a.html'

./s3u.phps mkobject org.muellerware.testing a/a.html data/a/a.html 

Read the contents of the object named 'a/a.html' in bucket 'org.muellerware.testing'

./s3u.phps getobject org.muellerware.testing a/a.html 

Update the contents of the object named 'a/a.html' in bucket 'org.muellerware.testing' with the contents of the file 'data/a/a.html'

./s3u.phps putobject org.muellerware.testing a/a.html data/a/a.html

Delete the object named 'a/a.html' in bucket 'org.muellerware.testing'

./s3u.phps rmobject org.muellerware.testing a/a.html 
writeFooter(); ?>