Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8109869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:33:25+00:00 2026-06-06T01:33:25+00:00

Am using below third party API in my project development http://undesigned.org.za/2007/10/22/amazon-s3-php-class I have done

  • 0

Am using below third party API in my project development
http://undesigned.org.za/2007/10/22/amazon-s3-php-class

I have done all task like upload, delete, bucket-list, object-list with this API,
but one of major task to create object download link form a bucket is hazy.

Official Amazon API has :
get_object_url ( $bucket, $filename, $preauth, $opt )
to get any object’s URL, but with above API is lack of method and documentation.

Its shows following error with this code when i click on download link:

Code

<h1>All uploaded files</h1>
<?php
    // Get the contents of our bucket
    $contents = $s3->getBucket("mybucket");
    foreach ($contents as $file){

        $fname = $file['name'];
        $furl = "http://mybucket.s3.amazonaws.com/".$fname;

        //output a link to the file
        echo "<a href=\"$furl\">$fname</a><br />";
    }
?>

Error

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
 <Code>AccessDenied</Code>
 <Message>Access Denied</Message>
 <RequestId>5A23C56B55611736</RequestId>
 <HostId>m2V2NlI19zgGPq0o4lXmIfod2BeQZIkuH4Yu651372cE/hfa9BkLdV8y3LlYjtw1</HostId>
</Error>

If someone has any idea or experience with this API then suggest me. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T01:33:28+00:00Added an answer on June 6, 2026 at 1:33 am

    So you are using : http://undesigned.org.za/2007/10/22/amazon-s3-php-class S3 class, and want to create download link of an object from bucket

    You should try this:

    $s3 = new S3($aws_access_key, $aws_secret_key);
    
    $url = $s3->getAuthenticatedURL($aws_bucket_name, $file_name, 3600));
    
    echo "<a href='$url' target='_blank'>Download</a>";
    

    This download link will expire after 1hr(3600sec.), you can extend expire time by the last parameter to increment it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a method (shown below). The project is compiled using ARC, but
I am using below code to upload excel and INSERT in mysql in php
I got the source below from a third-party site explaining how to download a
I am trying to consume a third party WSDL using the Weblogic 10.3 clientgen
I'm using an existing database made by a third party with sqlalchemy. However, I'm
We're using DotNetNuke 5.01. I've downloaded a module from a third party company. While
I have to call a third party webservice that expects and only accepts illegal
I am new to using ANT and am trying to include third party jars
I am trying to deploy a .NET 3.5 application using a third-party assembly. I
I'm writing applications that interoperate with a third-party application. This application exposes an API

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.