I am using amazon s3 v3 php sdk and I am trying to get the key of the whole object for this, I am using
s3->listObjects([ 'Bucket' => $somebucketName]);
this function works fine and I get the whole object under the bucket $somebucketName and its in the form below
Aws\Result Object ( [data:Aws\Result:private] => Array ( [IsTruncated] => [Marker] => [Contents] => Array ( [0] => Array ( [Key] => 1.PNG [LastModified] => Aws\Api\DateTimeResult Object ( [date] => 2015-07-14 07:22:25.000000 [timezone_type] => 2 [timezone] => Z ) [ETag] => "23f423234v23v42424d23" [Size] => 19980 [StorageClass] => STANDARD [Owner] => Array ( [DisplayName] => sfsfssfsdf [ID] => 242f2342242342252g42f42vt34 ) ) [1] => Array ( [Key] => 58.jpg [LastModified] => Aws\Api\DateTimeResult Object ( [date] => 2015-07-14 07:20:26.000000 [timezone_type] => 2 [timezone] => Z ) [ETag] => "vrtet4v4t54tvt4gvtgv45" [Size] => 1226694 [StorageClass] => STANDARD [Owner] => Array ( [DisplayName] => sfsfssfsdf [ID] => 34t3t3t3y43y4yg5yy4vg6u676 ) ) [2] => Array ( [Key] => HDFHDFHDFHDFHFHFH [LastModified] => Aws\Api\DateTimeResult Object ( [date] => 2015-07-30 12:07:42.000000 [timezone_type] => 2 [timezone] => Z ) [ETag] => "3453345343rcf3f3r3r3f" ) [Name] => SFSSD [Prefix] => [MaxKeys] => 1000 [@metadata] => Array ( [statusCode] => 200 [effectiveUri] => https:
now my question is how to get an array of keys as below object
array("1.png","58.jpg","HDDHDFHDHDGH);
source share