반응형
require '/www/aws/aws-autoloader.php';
$accessKey = "key";
$secretKey = "secret";
use Aws\S3\S3Client;
use Aws\S3\Exception\S3Exception;
$credentials = new Aws\Credentials\Credentials($accessKey, $secretKey);
$s3 = new S3Client([
'version' => 'latest',
'region' => 'kr-standard',
'endpoint' => 'https://kr.object.ncloudstorage.com',
'credentials' => $credentials
]);
$result = $s3->listBuckets([]);
echo "<br>";
for($i=0;$i<count($result[Buckets]);$i++)
{
echo $result[Buckets][$i][Name];
echo "<br>";
}
반응형