[PHP] Download Link !
Hello, When I purchased a website template from templatemonster.com, they sent the download link to my email, this link was active for only 2 or 3 days then it became inactive. Now I'm writing a script for selling website templates, the templates are uploaded to a certain folder, when someone buys a template a download link must be sent to his/her email address, and must be active for only 2 or 3 days.. Anyone have an idea how to start or where to start? Any link, any tutorial? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Download Link !
On Fri, 25 Mar 2005 11:25:09 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, When I purchased a website template from templatemonster.com, they sent the download link to my email, this link was active for only 2 or 3 days then it became inactive. Now I'm writing a script for selling website templates, the templates are uploaded to a certain folder, when someone buys a template a download link must be sent to his/her email address, and must be active for only 2 or 3 days.. Anyone have an idea how to start or where to start? Any link, any tutorial? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php A quick outline: when a user purchases something, enter an unique string (try md5(microtime()) although it's not completely unique) into the database. make a script that verifies the string... verify.php?unique=12345user=johndoe in verify.php you'd have something that compares $_GET['unique'] to the database value, same with $_GET['user'] Then if that's good, send the download link. However, I would use headers for downloads. By doing this you can place your template files outside your web directory, which will make it more secure, obviously. if you know how to use pear then i suggest using http_download. if you don't, have a look at the fpassthru bit in the manual. http://www.php.net/fpassthru hth... it was a bit too simple but you have the general idea now :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download Link !
On Friday 25 March 2005 14:25, [EMAIL PROTECTED] wrote: Hello, When I purchased a website template from templatemonster.com, they sent the download link to my email, this link was active for only 2 or 3 days then it became inactive. Now I'm writing a script for selling website templates, the templates are uploaded to a certain folder, when someone buys a template a download link must be sent to his/her email address, and must be active for only 2 or 3 days.. Anyone have an idea how to start or where to start? Any link, any tutorial? http://www.oscommerce.com has what you need. -- Win a Vespa Scooter or a Dell Gift Card worth $3,000.00 http://www.morningstarcom.net/raffle-contest.php -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] download link
are there any php functions that handle downloads? For Instance I want to create a link that contains a url string. In this string a variable is defined as a file. This file will be downloaded when the user clicks on the link. How do you handle this file in php? Is there a function that will do this. I have tried the copy function but it does not seems to work. Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] download link
You mean like: ?php $file = whatever.exe; echo a href=\downloads/$file\Get This File/a; ? Which would make a download link for downloads/whatever.exe in HTML? Adam Voigt [EMAIL PROTECTED] On Tue, 2002-06-11 at 11:43, Kris Vose wrote: are there any php functions that handle downloads? For Instance I want to create a link that contains a url string. In this string a variable is defined as a file. This file will be downloaded when the user clicks on the link. How do you handle this file in php? Is there a function that will do this. I have tried the copy function but it does not seems to work. Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php