View Full Version : Counter & Protection help please
02-10-2010, 09:35 AM
I am setting up my new website, which is my DJ site, featuring my mixes for download. Everything so far is running smoothly but I need to implement a couple of things.
I want to hide/protect the download links, hide my page source, disable right click etc, all the scripts I have searched so far are for designed for files hosted on the webserver, whereas mine are hosted on mediafire pro, so its the links that require protection, not the files. I know nothing is 100% secure, but if it makes it harder for some, its worth it.
I did try encrypt html, but it messed my pages up and put everything out of alignment.
Also on the mixes page there is a table with several mixes, each has title, artists featured, genre, listen, download cells. I am going to shorten the artists featured by making it appear when hovering over "tracklist" so it frees up some space, then after the download cell I want a cell with download/click count, and a cell after that with a small 5 star rating system.
again I have searched but either find dead links to the ones that seam suited, or the scripts have been more aimed at tracking and stats, I just want a visual indication next to each mix.
To see what I mean, check one of the pages I want to impement this like this one (http://www.djpleasure.co.uk/funky.html)
As you can see the download links/buttons are swf each uses a separate xml file on server for the link .
This is my first attempt at web making so I am not totally clued up with it all. I have msql, FrontPage Extensions & SSH Access
Perl, PHP4,5, Python, Miva, Sun ASP
Any help or suggestions would be greatly appreciated
02-10-2010, 06:13 PM
Counters are easy. Rating systems are more complex. There are scripts out there though if you want to try to use one. The difficulty will be in integrating it with your website. For anything like this, though, you will need to start with a database. The organization can be complex, but all of the operations will be standard database processes-- so look at any introduction to using databases and it will get you started. Basically cross reference numbers and names and you can rate, rank, count, etc.
Hiding download links is impossible. You can make it difficult, but this ALWAYS comes at the price of making things inconvenient for your users. As you experienced with encrypting source code that causes many more problems than it fixes. HTML must be sent to the browser and must be USED by the browser, so it must be decrypted at some point. Anyone who knows what they are doing can grab the source if needed. And remember: the people who are trying to hack your site know more than the average user-- the average user will just be using your site as you desire and if you make things harder to stop the others, then the average user will not want to use your site any more. Consider the overall effect. Basically, the best protection is to not put your songs up. Just like you obviously need to do that, part of putting your music on the web is having some of it stolen. For example, there are programs that will record the audio output of a program. That has nothing to do with source code and is quite easy to do. So nothing you do (aside from not letting them listen) will stop them from recording it that way.
In terms of realistic protection, here's a summary:
1. Source code [HTML] cannot and will not ever be hidden. View source is always available: browsers don't allow a website to block this.
2. Source code should never be "encrypted" and it's basically useless anyway.
3. If the user can see/hear something, there's a way to save it.
4. Links can be made harder to access such as rotating it on a daily basis or various other strategies, but still, it's possible to get at the files if someone wants to.
5. A user login system is fairly secure, but even with that people could share files with their friends, and those logged in users could steal it.
6. The best protection is always to not put up high quality files. Maybe give 30 second samples. That's your choice. For images, people use watermarks/low resolution images. There's not really a good equivalent for audio. Low quality (high compression) or short clips are your only options, really.
7. The hardest type of file to download is one embedded in flash. It's certainly possible to access it, but this can be time consuming and requires some knowledge. It's not a terrible idea to try to obscure things in flash a bit. That won't hurt any viewers (except requiring that they have flash) and will make people stealing it work harder if not give up. The best method here is to hard code the URLs into the flash file, or even embed the audio files into the swf directly. Both methods have advantages/disadvantages and as a web designer both will be harder than just using a normal playlist, but that will give you a bit of protection against casual theft.
8. Stealing has a direct relationship with popularity. If your site is small and not popular, some very basic methods of "protection" might get the few thieves you have to give up. If your site becomes very popular, there will be basically nothing you can do to stop dedicated thieves.
9. The only protection you can get is to make complicated systems that are hard to understand. It's never impossible to get at files, but if it takes too long to track what's going on in various layers of course code it may discourage people. But always be VERY careful: if you make it awkward in any way for the casual user, you will lose visitors that way. If it's silently complex (in the source), then that's probably fine, though as you saw with 'encryption' it makes things harder to maintain.
02-12-2010, 06:45 AM
Thanks for the response Daniel. I guess I can forget ratings as dl count will reflect popularity of mix anyway. In regards to counter, I have not yet found a suitable script whereas I can use multiple counters on one page. All i find is page hit counters or counters with stats. I can do away with the protection for now also. I just really need to get the download counts sorted as a matter of urgency so I can progress and finish the site, but I am totally clueless.
02-12-2010, 07:01 AM
Trying to make a counter script fit here is a terrible approach. This is a much bigger system, and it will be much simpler, IN THE END, if you write it yourself to fit the simplest way with your database. The place to start is by building a database and learning the basics. As I said above, none of these individual aspects are hard (or even very advanced, compared to general database operations), but the entire setup will get complex. It will be much more so if you try to use prebuilt scripts that aren't meant to fit in with your system to build something from all of them.
You are looking for something much more than a "script". You need basically a server side "program".
You could look on google for some options for prebuilt content organizing solutions, but you'll have more control and it'll work out better in the end if you just start building it yourself.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.