Need help writing a user login script
Posted: Tue Jun 14, 2005 2:37 am
Hi, this is my first post so I apologize in advance if I'm breaking any rules.
I'm in charge of a website selling original music. Alternatively, I want to be able to give buyers the option of paying to download a zip file of mp3's, rather than ordering a CD.
I've already set up a test page with a link to a test zip file, which has an anti-leech style script running so that the link will only work if you click it from said page. It also disguises the URL of the zip for added security.
Now, I need to be able to make it so that in order to get to this page and download the zip file, you have to enter a username and password which is given to you after you pay for the music. This will be done manually, the script doesn't have to generate the login information or email it to the buyer. I want to implement a measure so that the login information will only work for the person it is given to, so as to prevent piracy.
So basically, I need help writing a script so that when you go to website.com/downloadmusic.php (or whatever it ends up being) you are prompted to enter a username and password, and once you do only the IP address which first uses that login information can use it again. You put in your information, it sends you to the download page where you can download your zip file of music that you just paid for, and if you try to send your login information to your buddy it wont work for him.
I am very new to writing in PHP, so any help even if it seems unnecessary would be GREATLY appreciated. I thank you all in advance.
I'm in charge of a website selling original music. Alternatively, I want to be able to give buyers the option of paying to download a zip file of mp3's, rather than ordering a CD.
I've already set up a test page with a link to a test zip file, which has an anti-leech style script running so that the link will only work if you click it from said page. It also disguises the URL of the zip for added security.
Now, I need to be able to make it so that in order to get to this page and download the zip file, you have to enter a username and password which is given to you after you pay for the music. This will be done manually, the script doesn't have to generate the login information or email it to the buyer. I want to implement a measure so that the login information will only work for the person it is given to, so as to prevent piracy.
So basically, I need help writing a script so that when you go to website.com/downloadmusic.php (or whatever it ends up being) you are prompted to enter a username and password, and once you do only the IP address which first uses that login information can use it again. You put in your information, it sends you to the download page where you can download your zip file of music that you just paid for, and if you try to send your login information to your buddy it wont work for him.
I am very new to writing in PHP, so any help even if it seems unnecessary would be GREATLY appreciated. I thank you all in advance.