|
Hi guys I Want to start a Music Download site that will require a user to first register with me and then he will have access to download SOngs from my website I want to add a feature that will give users a Download Limit where he can download only 5 songs if he is a Free user.
and upon his subscription he can add his download limits.
example
A user pays me Rs 100 so he can download 100 songs etc. etc
Can any one help me.
hefin Dsouza
|
|
|
|
|
Hi,
I am trying to give your answer i don't know that if it is correct or not yet hope it is useful to you.
You may have a database for the website, in it u will have a table for user, in which u will have 3 fields as such user_id, user_status and down_count, now whenever the user download a song pass a query: "select * from tbl_user where user_id = 'userid'". you will have a result b'cause user_id is primary key. Now you have to check that if(user_status == 'free_user') if true then check the down_count- if(down_count > 4) - if true then give the offer to download more songs after paying money else let him to download song and increase down_count.
Hope for the best.
|
|
|
|
|
In addition, you can store the music files inside a database, encoding them as best fits to you.
Usually it cost lot of adicional space, but grants in a easy way to implement all the security u need to prevent people downloading files without permission.
Maybe u'll like to have an entity that keep track of what files users are downloading. If you add the date/time of the download u can use this entity to count how many downloads a usar did during the day.
_________________________________
(\_/)
(O.o) This is Jack, the Rabbit.
(> <) Help Jack in his global domination issue, copy it in you sign.
The ONG "Jack's Support team" thanks your help. Thank you, and have a nice day.
_________________________________
|
|
|
|
|
Don [Gunar] wrote: you can store the music files inside a database,
That is honestly not an incredibly good idea.... It creates a rather slow interface.
Anyway I'm not getting into that too far, there is already enough heated discussion over storing photos in a database.
(Just to add one argument though, If it is a multi server config then a file server would probably be a better option.)
Brad
Australian
"The Probability of you doing that makes 0 look like a big number" - My Mate Oxley
|
|
|
|
|
Could you be a little more descriptive in your environment. What OS, what Language, What server.
Also one thing you are really going to need to decide upon is where you are going to store the music. This task will be quite complex because if you store on a standard http web server it will be hard to give dynamic access to files, whereas if it was stored on an FTP server then you could set permissions more easily and still retain a reasonable amount of speed.
That being said PHP is well equipped for serving files that are stored away from a publically accessible place.
Anyway give me some more information and i will try give you some better advice.
Brad
Australian
"The Probability of you doing that makes 0 look like a big number" - My Mate Oxley
|
|
|
|
|
I'm interested to know if you have a deal with a music company, or if you're writing an illegal pirate site ?
Christian Graus - C++ MVP
|
|
|
|
|
What, you don't trust someone who goes by the name of skullz_software?
I'm sure he is actually in a great position to legally sell his music... I mean i know that someone doing this as a personal project is probably not working for the kind of company that would be able to get the deal, but I'm sure he will think of something.....
Brad
Australian
"The Probability of you doing that makes 0 look like a big number" - My Mate Oxley
|
|
|
|
|
LOL. Well, I dunno what country's money Rs is, or what Rs 100 translates to, but given that he's in india, I assume it's rupees, and 100 rupees isn't enough for any record company to sell 100 songs.
Christian Graus - C++ MVP
|
|
|
|
|
Wow, I've never seen anyone who was able to put "Rupees" and "enough" in the same sentence!
I don't think my dear lad skull intends too heavily on involving a record company in all this.
Brad
Australian
"The Probability of you doing that makes 0 look like a big number" - My Mate Oxley
|
|
|
|
|
We use javascript on our website to open a separate help window. Is there a way we can programmatically close that window (assuming I'd need to use javascript for it).
So, here's how it will go:
Page1.html uses javascript to open a new window
Page2.html will need to close that new window
-- modified at 14:47 Friday 17th November, 2006
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thought I had the answer, until you modified the post.
In the same page, you'd do:
my_window = window.open( ... );
then close it with
my_window.close();
Now, how to do it from another page.....
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I work with IE only so don't know about other browsers.
Page2 would have to have a way of referencing page1. Does it? If so cross page scripting is the same as cross frame scripting.
led mike
|
|
|
|
|
|
Take a look at this lame hack I wrote. Works, but if you click close when the popup window isn't open, it briefly flashes on the taskbar, and in FF the window isn't completely off the screen. Inject the same code into page1 and page2, and give it a shot.
<html>
<head>
<script type="text/javascript">
function open_help_window()
{
window.open("","my_help_window","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=yes, copyhistory=yes, width=400, height=400")
}
function close_help_window()
{
// if the window already exists, window.open will give us a reference to it
// otherwise a new window is created off the screen and immediately closed
// attempt to position window off the screen (not quite in FF)
var x = screen.width + 100;
var y = screen.height + 100;
var win = window.open("","my_help_window","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=yes, width=1, height=1, screenX=" + x + ", screenY=" + y + ", left=" + x + ", top=" + y);
if ( win )
win.close();
}
</script>
</head>
<body>
<form>
<input type="button" value="Open Help" onclick="open_help_window()">
<br>
<input type="button" value="Close Help" onclick="close_help_window()">
</form>
</body>
</html>
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I'm not a JavaScript guru, I'm more server side orientated, but I think that you should be able to reference the pop up via its name as long as you are doing it from the same domain as you launched the popup from.
Here is my example:
PAGE 1:
<<SCRIPT LANGUAGE="javascript"><br />
<!--<br />
<br />
function open_window(){<br />
<br />
window.open ('popup_page.html', 'POPUP', config='height=100,<br />
width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no,<br />
location=no, directories=no, status=no')<br />
}<br />
--><br />
</SCRIPT>
PAGE 2:
<<hr />
Brad
Australian
"The Probability of you doing that makes 0 look like a big number" - My Mate Oxley</div>
|
|
|
|
|
please help onclick event of a button i have to enter a text in some label that i have already placed on the form. I have made a function in the script tag and I am calling this function on the click event of the button but it says label1 not defined. All this should be in HTML/XML format. I know this is very easy, I can do the same thing through ASP.net but I want to do that by inserting in the HTML tags of the button. please help.
function lab1()
{
label1.text="Nakul"
}
I am calling this funtion:
Nakul
|
|
|
|
|
Javascript, being client-side, does not recognise the server-side "text" property of your label, nor even know it is a label - take a look at the page source as rendered in the browser to see how your page is rendered...
try replacing the javascript line with this instead:
document.getElementById("Label1").innerHTML="Nakul";
cheers
Fred
|
|
|
|
|
JavaScript and ASP.net are 2 very different languages. If you plan to use JavaScript then maybe you should do some research in the specifics of that language.
The above suggestion shows what the correct format for the what you intend to do is.
Brad
Australian
"The Probability of you doing that makes 0 look like a big number" - My Mate Oxley
|
|
|
|
|
Does anyone have a full example on how it works? Specifically, I'm looking for ways to get whole sentences and highlighted column data if possible (startrow to endcolumn). The MSDN mentioned the following keywords, but Googling for these came up sort of empty (except for word). Thanks.
Member name Description
wdCell A cell.
wdCharacter A character.
wdCharacterFormatting Character formatting.
wdColumn A column.
wdItem The selected item.
wdLine A line.
wdParagraph A paragraph.
wdParagraphFormatting Paragraph formatting.
wdRow A row.
wdScreen The screen dimensions.
wdSection A section.
wdSentence A sentence.
wdStory A story.
wdTable A table.
wdWindow A window.
wdWord A word.
"This perpetual motion machine she made is a joke. It just keeps going faster and faster. Lisa, get in here! In this house, we obey the laws of thermodynamics!" - Homer Simpson
Web - Blog - RSS - Math - LinkedIn - BM
|
|
|
|
|
hi all, this is my javascript code. var1 goes in as string so i turn it to number. this code returns always 10! i cannot find anything why it's happening.. thanks for help...
function foo(var1, var2)
{
var1 = new Number(var1);
switch(var1)
{
case 1:
return 1;
break;
case 2:
return foo2(var2);
break;
default:
return 10;
}
}
svs
|
|
|
|
|
This seems to be a problem with the language itself not with the switch.
Try using:
var1 = new Number(var1)- 0;
Ernesto Tejeda
|
|
|
|
|
You are creating a Number object, which is not the same as a number value.
Try:
var1 = Number(var1);
or
var1 = parseInt(var1);
---
b { font-weight: normal; }
|
|
|
|
|
thanks for helping both of you guys.. parseInt looks familiar
|
|
|
|
|
Hi all,
I've just updated my website and am looking for anyone who fancies taking a look at it and giving me some constructive criticism. I know some of you have helped me before with beta testing (thanks for that), any comments would be great.
Oh yes, the link... it's here[^]!
Cheers
Andy
-- modified at 10:46 Friday 17th November, 2006
|
|
|
|
|
what's is the postfix "ashx" means?
=========================================
中国,昆明
|
|
|
|