SMFHacks.com

Presales => Presales for Products => Topic started by: knat on March 17, 2009, 06:32:50 am

Title: Can SMF Store support Rapidshare Direct Downloads ?
Post by: knat on March 17, 2009, 06:32:50 am
Hello

I am thinking of buying your software but i have questions.

I want to sell files that are hosted on rapidshare but buyers dont need a Rapidshare account to download them.
Rapidshare has a system where i can pay for what others download. Supports up to 2 Gb filesize.

Its called Secure Traffic share. And here is some information about it:



What is Secure TrafficShare?
With secure TrafficShare, you have the ability to limit the period in which files are available for downloading.
The expiry date of the download link is set by you. In this way, you can control for how long the file can be retrieved.
Secure TrafficShare enables you to make files available for downloading in a secure area of your website.
You have to have knowledge of programming to use this feature. 

How is the TrafficShare link made secure?
Change the relevant file into a secured TrafficShare file in your Premium Zone.
Create the download link as shown in the examples.
When calculating the expiry date, please note that in all cases our server time has to be used. You can see the current server time in the Premium Zone. If your local time is different, the programer has to take it into consideration and make the adjustments.

Example of a code in PERL for the creation of a secure TrafficShare link:
Example of normal download link: http://rapidshare.com/12345678/yourfile.zip

Code: [Select]
#!/usr/bin/perl
use strict;
use warnings;
use Digest::MD5("md5_hex");

my $premiumaccount = "12345";     # Insert Premium Account ID
my $fileid = "12345678";          # Insert File ID
my $filename = "yourfile.zip";    # Insert file name
my $killcode = "123456789012345"; # File Killcode. The Killcode can be viewed in the Premium Zone under "Export Details"
my $validuntil = time + 300;      # Effective for 300 seconds from now on
my $md5hex = md5_hex("$premiumaccount,$fileid,$killcode,$validuntil");

print "Secured link is: http://rapidshare.com/files/$fileid/t$validuntil-$md5hex/$filename";
                   
Example of a code in PHP for the creation of a secure TrafficShare link:
Example of normal download link: http://rapidshare.com/12345678/yourfile.zip

                   

Code: [Select]
<?
$premiumaccount = "12345";     // Insert Premium Account ID
$fileid = "12345678";          // Insert File ID
$filename = "yourfile.zip";    // Insert file name
$killcode = "123456789012345"; // File Killcode. The Killcode can be viewed in the Premium Zone under "Export Details"
$validuntil = time() + 300;    // Effective for 300 seconds from now on
$md5hex = md5($premiumaccount.",".$fileid.",".$killcode.",".$validuntil);

print "Secured link is: http://rapidshare.com/files/$fileid/t$validuntil-$md5hex/$filename";
?>
                   

Your program code should not be visible to others. For instance, a download link that is valid for 3 years could be created or the file could be deleted because the "Killcode" is included. If you offer the facility to generate download links on your website, you should under no circumstances program the process in JavaScript or any other client-side scripting language.

What time applies to the secure TrafficShare link?
The expiry date is calculated on our server. Thus the expiry date has to be based on the server time of RapidShare.
The current server time can be seen in the Premium Zone under "Overview".
Adjust the calculation of the time by adding or subtracting the difference between your local time and our server time.
If you are unsure, you can test the code by generating a link and accessing it before, and after the expected expiry time. 



Source: http://rapidshare.com/faq6.html

So my question is can i use the store to sell these links that will only work for a limited time ?
Title: Re: Can SMF Store support Rapidshare Direct Downloads ?
Post by: SMFHacks on March 17, 2009, 07:51:36 am
The store does support external links but does not allow you to insert php code to generate them that would require an edit to the store code.
Title: Re: Can SMF Store support Rapidshare Direct Downloads ?
Post by: knat on March 17, 2009, 09:07:48 am
Ok so it does not support it - to bad - thanks anyway, looks like a great piece of software :)