If I call the playlist .m3u through the .exe file nobody knows that I did that except for you and whoever else reads this so, in a way it would keep people from seeing where the url of my music is.
Untrue, it is almost trivial to pull a url in a binary/.exe (since the URL is a character string). I could easily write a program looking for a dotted quad notation, better yet, I could just use a simple hex editor and find it within minutes. -OR- Even easier, anyone could sniff the network packets and find the location of the mp3 file.
So let me get this straight, you want to allow endusers to download music (mp3 file) from a website, and play the content. BUT you want to do it without the end user knowing the location of the website AND you want to make sure the end user cannot play the file independently without your .exe file. Well, like Kybo said earlier, you are looking at writing your own codec, fileformat, AND a "player" to decode and play your "encrypted" content. And, again, Kybo is correct that you cannot prevent the content from being "ripped".
Fine, here are some things that could get you started.
- You need to learn how to do socket programming. Fairly simple and plenty of tutorials. You probably only have to write "client" code since the web page is the "server". Sockets will facilitate pulling information from your secret web site, such as the musical content.
- Once you have downloaded the content, I would recommend keeping it in main memory. If you decide to dump it to a file instead, then you risk the "end user" getting this file and playing it with xmms(winamp).
- After receiving the content, the next task is for you to write code to "play" the content and output them to speakers. You are now basically writing a stand alone music player. Assuming you are going to use a standard codec and file format, I think you can find some libraries that may handle decoding mpeg codec or whatever codec you choose. If you DON'T want to use a standard codec then you will probably want to write your own. If you decide to write your own, then you will need to learn about signals and signal processing. (google). If you don't want ANY compression, then you can skip the signal processing and just use a .wav (or whatever file format you want) and send the music content.
You can produce a single .exe to do all that I have mentioned and pass it out to whoever. Any determined hacker can still get the ip address of your web site. Any determined "ripper" can still dump the output (as mentioned by Kybo).
If you want I can write this code for you...I will charge you my regular consulting fee ($50 and hour).