gwk / s3streamwrapper
Amazon AWS S3 Stream Wrapper
Installs: 15 237
Dependents: 0
Suggesters: 0
Security: 0
Stars: 20
Watchers: 5
Forks: 3
Open Issues: 0
Requires
- aws/aws-sdk-php: >=2.1.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2025-03-01 16:04:37 UTC
README
A simple stream wrapper for Amazon S3.
Example
<?php use S3StreamWrapper\S3StreamWrapper; S3StreamWrapper::register(); $options = array( 'credentials' => [ 'key' => "YOUR AWS KEY HERE", 'secret' => "YOUR AWS SECRET HERE" ], 'region' => 'us-east-1', 'version' => '2006-03-01' ); stream_context_set_default(array('s3' => $options)); echo file_get_contents("s3://mybucket/file1"); echo file_put_contents("s3://mybucket/file2", "Foobar!"); print_r(scandir("s3://mybucket/"));
License
MIT, See LICENSE