GithubHelp home page GithubHelp logo

diegoponce / amazon-s3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from phpclicks/amazon-s3

0.0 2.0 0.0 12 KB

What is Amazon S3? Amazon Simple Storage Service (Amazon S3), S3 stands for “Simple Storage Service”, is an amazon service which provides us a highly scalable, durable and secure storage. It is easy and simple to use with a simple web service interface. We can store and retrieve our data from anywhere and anytime on the web. It makes buckets for us so we can store our data in our buckets. Amazon S3 is an ideal option that reduces file load time and bandwidth usage. We know that uploading function is the sensitive part in any web project, a little bit mistake will allow hackers to upload the malicious files. Amazon S3 will provide you the safe side

Home Page: http://phpclicks.com/amazon-s3-file-upload-using-php

PHP 100.00%

amazon-s3's Introduction

amazon-s3

You can download most recent version of Amazon PHP SDK by running following composer command

 composer require aws/aws-sdk-php

 // Include the SDK using the Composer autoloader
  require 'vendor/autoload.php';
  use Aws\S3\S3Client;
  use Aws\S3\Exception\S3Exception;

    // Set Amazon s3 credentials
  $client = S3Client::factory(
  array(
  'key'    => "your-key",
  'secret' => "your secret key"
   )
  );

    try {
    $client->putObject(array(
         'Bucket'=>'your-bucket-name',
         'Key' =>  'your-filepath-in-bucket',
         'SourceFile' => 'source-filename-with-path',
         'StorageClass' => 'REDUCED_REDUNDANCY'
    ));

} catch (S3Exception $e) {
     // Catch an S3 specific exception.
    echo $e->getMessage();
}

amazon-s3's People

Contributors

phpclicks avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.