EllisLab text mark
Advanced Search
4 of 17
4
   
Linklocker Free (encrypt download links)
Posted: 23 June 2008 06:20 PM   [ Ignore ]   [ # 55 ]   [ Rating: 0 ]
Avatar
Joined: 2008-02-27
248 posts

Vincent,

Tested with .mp3 extension, that isn’t the issue. I tried what I suggested to you and found that while clicking the link did actually link to the download of the .mp3 file, it wouldn’t play in the Yahoo Media Player. I did, however, figure out sort of a compromise. If you will set the files you wish to play up in a playlist (.xspf format), you can use linklocker on the playlist so that the location can’t be found (the playlist location will be encrypted) and therefore links will effectively be encrypted. I was able to verify that this method works - hope you find it useful. More info on using XSPF playlists here.

 
Posted: 23 June 2008 06:41 PM   [ Ignore ]   [ # 56 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-12
66 posts

Hi Brad,

Thanks for taking the time for this.

I’ll try it tomorrow. It’s getting late here grin

Vincent

 
Posted: 24 June 2008 06:52 AM   [ Ignore ]   [ # 57 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-12
66 posts

OK.

Things have changed but still don’t work!

I can’t use the Yahoo Media Player since they generate <a> tags in addition to the playlist.
So basically the playlist is encrypted but you can still get access to the file and download it.
Not really useful to protect the file grin

So I switched to another popular player (http://www.jeroenwijering.com).
I tried your script with an encrypted mp3 file as well as a XSPF Playlist.

Unfortunately it still doesn’t recognize it.
When it’s not encrypted it works fine though.

I don’t get it why it doesn’t work. Do you have any more ideas?

Thank you so much for your help, you’re so kind…

Vincent

 
Posted: 24 June 2008 10:58 AM   [ Ignore ]   [ # 58 ]   [ Rating: 0 ]
Avatar
Joined: 2008-02-27
248 posts

Hi Vincent,

Well I’ve spent most of my morning trying to find a way to assist, and I’m afraid I can’t help you with this. For my own site, I’ve customized the XSPF player to play the songs from a playlist and disabled making them downloadable, and of course, hidden the playlist. Just took a bit of Actionscript to make the magic happen - you can see the results at the best band website in the world! The player is usable embedded in the page, or via a popup - text link below the player. You can download the XSPF player here for free, but you’ll need to customize it with a bit of AS for desired results. Best of luck!

 
Posted: 25 June 2008 07:20 PM   [ Ignore ]   [ # 59 ]   [ Rating: 0 ]
Avatar
Joined: 2007-02-08
48 posts

Brad, this looks like a nice module.

Something that may be a nice feature addition would be if the module checked the file extension (.pdf, .mp3, .jpg, etc.) and ended its created link with the same extension.

Example:

"site.com/files/doc.pdf" 
passes through Linklocker and becomes
"1203984713048dsfphewhatever.pdf" 

Keeping the extension would be very helpful for certain CSS uses like attribute selectors, so in the above example:

a[href$='.pdf'] { 
    padding
5px 0 5px 22px;
    
backgroundtransparent url(/images/icons/icon_pdf.gifno-repeat left center;

could style the ‘locked’ link.

It seems like this would solve Vincent’s problems too.

Thanks.

 
Posted: 25 June 2008 08:31 PM   [ Ignore ]   [ # 60 ]   [ Rating: 0 ]
Avatar
Joined: 2008-02-27
248 posts

Hey Lee,

Thanks for the excellent suggestion - may incorporate it into a future version. However, this will not solve Vincents problem - tried dynamically adding & removing the extension on the end and it had no affect on operation of the Yahoo Media Player.

Either way, thanks for contributing with a great suggestion!

 
Posted: 26 June 2008 04:19 AM   [ Ignore ]   [ # 61 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-12
66 posts

Thanks again Brad for all your support and work!

Things aren’t working for everybody but I’m still using your module for another part of the site.

For the mp3, I just found out I can hide the directory in the AS file of the player. It’s not as good but it’s an alternative solution grin

Vincent

 
Posted: 03 July 2008 10:46 AM   [ Ignore ]   [ # 62 ]   [ Rating: 0 ]
Avatar
Joined: 2002-10-10
121 posts

Perfect. Absolutely perfect. Thanks for this module!

One question, though. My current project doesn’t really require protection of the link or anything. I just want an easy way for people to download instead of play (I’m giving them a choice for either one).

Is there a way to set the link so it never expires? If I enter 0 as the expire time, will that do it?

 
Posted: 03 July 2008 10:56 AM   [ Ignore ]   [ # 63 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-12
66 posts

Fitzage, I didn’t use the expire variable and the link doesn’t seem to expire that way (at least that’s what I think!)

Vincent

 
Posted: 03 July 2008 10:59 AM   [ Ignore ]   [ # 64 ]   [ Rating: 0 ]
Avatar
Joined: 2002-10-10
121 posts

It says that it defaults to 5 minutes. I noticed this when I refreshed the page that originates my download, and then went to make coffee. I came back and clicked a link and it wouldn’t work because it had expired. At least that’s what I think happened. Another refresh and it was fine again.

 
Posted: 03 July 2008 10:59 AM   [ Ignore ]   [ # 65 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

I’m not sure if I’m correct on this one or not but I thought I seemed to remember that if you set expires=“0” then it would automatically set it to 5 minutes for you instead. I could be wrong on that though. Should be easy enough to test though just create a link with expires=“0” in it and then don’t refresh the page for at least 5 minutes and 1 second wink okay a little more just to be sure, and then see if the link still works.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 03 July 2008 11:06 AM   [ Ignore ]   [ # 66 ]   [ Rating: 0 ]
Avatar
Joined: 2008-02-27
248 posts

Yes, that’s correct behavior. By default it creates a link that will expire in five minutes. That’s to prevent someone from posting the link for general consumption - that link would no longer work. However, if you refresh the page that creates the link it will create a new link. In order to prevent this natural behavior, you would want to add a check before creating the link, perhaps to see how long ago the user was approved for the download. Based on this info, you could avoid creating a link altogether if it was more than a day, a week, whatever.

 
Posted: 03 July 2008 11:16 AM   [ Ignore ]   [ # 67 ]   [ Rating: 0 ]
Avatar
Joined: 2002-10-10
121 posts

OK, thanks. I think I’ll just set it for a longer period of time than they’re likely to be looking at the static page.

 
Posted: 03 July 2008 11:21 AM   [ Ignore ]   [ # 68 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts
Brad Street - 03 July 2008 03:06 PM

In order to prevent this natural behavior, you would want to add a check before creating the link, perhaps to see how long ago the user was approved for the download. Based on this info, you could avoid creating a link altogether if it was more than a day, a week, whatever.

Okay Brad I’m either very tired or missed that tutorial somewhere wink

How would you go about doing this kind of thing? Would be great for when you offer downloads in a secure area but want to only let them download for say 24 hours and then that’s it.

Would be great to know how to do that if you have the time?

Thanks again for such a great module that many people must be finding really useful in here.

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 03 July 2008 11:35 AM   [ Ignore ]   [ # 69 ]   [ Rating: 0 ]
Avatar
Joined: 2008-02-27
248 posts

I’ll try to find the time to post a tutorial on how to do this, or write a module to automate it - just a matter of finding the time and that’s in short supply lately.

For myself, I’ve simply created a script that emails encrypted links to the user once IPN is received from Paypal - saves me the trouble of them having to be members of the site to make a purchase - but they can’t go view download links on the site yet, as I’m not storing the links in the DB. This way, if they need something more, they can just email me.

Anyways, will try to find the time in the near future to further explain. I’m debating writing a “pro” version of this module that will do additional things like tying into Paypal & emailing links & such.

 
4 of 17
4