Category: Amzon s3 and Php

Amzon s3 and Php

How to create a instance of aws s3 class to upload files using php?

if (!class_exists(‘S3’)) require_once ‘s3.php’; // include s3.php file if (!defined(‘awsAccessKey’)) define(‘awsAccessKey’, ‘keyhere’); //awsAccessKey key here if (!defined(‘awsSecretKey’)) define(‘awsSecretKey’, ‘secretkey here’); //secret key $bucketName = “bucketname”; // bucketname if (!extension_loaded(‘curl’) && !@dl(PHP_SHLIB_SUFFIX == ‘so’ ? ‘curl.so’ : ‘php_curl.dll’)) exit(“\nERROR: CURL extension not loaded\n\n”); $s3 = new S3(awsAccessKey, awsSecretKey); For more deatils : https://www.pgs-soft.com/blog/how-to-store-and-manage-files-on-amazon-s3-with-php-class/

Amzon s3 and Php

How to create and access buckets in amazon s3?

How to create and access buckets in amazon s3 with php? In amazon s3 storage, files(objects) are stored inside buckets,we need to create buckets to store the objects. To create buckets s3 provide different API, that is we can create buckets within code itself. Or we can create the buckets from s3 console itself. We…

Amzon s3 and Php

What is amazon s3?

Amazon s3 or simple storage system is storage service by aws. Here files are stored as objects. Objects are stored in buckets. so we need to create buckets first and then store objects inside it. we can assign the accessibility (ACL) to objects as private or public. public objects will be accessible to all. Private…