whoami7 - Manager
:
/
proc
/
self
/
root
/
home
/
papecmvm
/
www
/
application
/
helpers
/
Upload File:
files >> //proc/self/root/home/papecmvm/www/application/helpers/vishal_helper.php
<?php use Aws\S3\S3Client; use Aws\S3\Exception\S3Exception; use Aws\CommandPool; if (!defined('BASEPATH')) exit('No direct script access allowed'); require_once APPPATH."third_party/aws/autoload.php"; class vishal extends CI_Controller { function __construct() { parent::__construct(); //aws $CI = & get_instance(); $bucketname = 'paperpushbucket'; $key = 'AKIAJJ72VRLHXBD272YQ'; $secret = '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'; $CI->s3 = S3Client::factory( array( 'credentials' => array( 'key' => $key, 'secret' => $secret ), 'version' => 'latest', 'region' => 'ap-south-1' ) ); } } function country(){ $CI = & get_instance(); $query = $CI->model->getDataModel('countries'); return $query; } function getAWS($Prefix){ $CI = & get_instance(); $bucketname = 'paperpushbucket'; $region = 'ap-south-1'; $objects = $CI->s3->getIterator('ListObjects', array( "Bucket" => $bucketname, "Prefix" => $Prefix )); $main = []; foreach ($objects as $object) { $main[] = $object['Key']; //echo $bucketname.'.s3.'.$region.'.amazonaws.com/'.$object['Key']. "<br>"; } return $main; } ?>
Copyright ©2021 || Defacer Indonesia