On 08.08.12, In 116, by sc_7cabc029490e9fcb99b8d58793c625bd
Amazon s3 sdk return folders only via prefix
function getPlaylist($id){
$bucket = 'bucket-name';
$s3 = $this->awslib->loader();
$response = $s3->list_objects($bucket, array(
'delimiter' => '/',
'prefix' => $id . '/'
));
//print_r($response);
$playlist = array();
foreach ($response->body as $object) {
if($object->Prefix){
$playlist[] = array('folder' => $this->xmldecode($object->Prefix));
}
}
return $playlist;
}
function xmldecode($txt){
$txt = str_replace('&', '&', $txt);
$txt = str_replace('<', '<', $txt);
$txt = str_replace('>', '>', $txt);
$txt = str_replace(''', "'", $txt);
$txt = str_replace('"', '"', $txt);
return $txt;
} 







Quick Signup And Connect
Enter your WordPress.com blog URL
http://.wordpress.com
Proceed