Skip to content

gwkunze/S3StreamWrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3StreamWrapper

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

About

A PHP Stream wrapper for Amazon S3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages