Skip to content

Instantly share code, notes, and snippets.

@seedprod
Created June 26, 2012 13:55
Show Gist options
  • Select an option

  • Save seedprod/2995920 to your computer and use it in GitHub Desktop.

Select an option

Save seedprod/2995920 to your computer and use it in GitHub Desktop.
Create Amazon S3 expiring link
$product_details = seedprod_get_product_info($slug);
$api_key_details = seedprod_get_api_key_info($api_key);
$version = trim($product_details['version']);
require_once 'amazons3-php/sdk.class.php';
$s3 = new AmazonS3();
$download_link = $s3->get_object_url('static.seedprod.com', 'files/'.$slug.'-'.$version.'.zip', '48 hours');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment