Left Quote    Treat your password like your toothbrush. Don't let anybody else use it, and get a new one every six months.
- Clifford Stoll    
Right Quote
[login] | [Register]

Accept Coupon Codes for Downloads

by: sm0ke
Page: 3 of 3
(View All)

The download script

The verify file will redirect the user to a download script on your server so the file requested can be downloaded. We have the variables of $domain, $querystring and $redirectstr $domain is the location of your download.php script which is what we are about to look at, the domain must contain "?file=" at the end, the $redirectstr joins the domain and file variables together to give the full URL to which the user is directed.


And thats it - well, not quite. The script isnt secure, its not meant to protect highly private files / personal files from being downloaded but should give you an insight into accepting coupon codes, verifying that code and requested download against a database and allowing the user to download while deleting the coupon from being used again.

The download script here is one i downloaded from somewhere a good year or so ago, if i remember where or who wrote it ill post the credits later. - You can always secure this script and use a more secure download script to boot. but it should give the basics.

1  |  2  |  3  |  


  Subject: "Accept Coupon Codes for Downloads" Date: Jan 09 2012 at 9:37 am    

Will you plz send me the zip pack of Accept Coupon Codes for Downloads with all the files.
  Subject: "re: Accept Coupon Codes for Downloa..." Date: Jan 10 2012 at 6:21 pm    

Everything you need is in this article.
You Must be logged in or a member to comment.

Tutorial Stats

Tutorial Stats

4 Total Comments
3 Rating of 5 (1 Votes)


Tutorial Options

· Login to Rate This Article
· Login to Post a Comment
· Read more by this author
Digg This Article! Bookmark This Article Reddit: Bookmark This Article BlinkList: Blink This Article! YahooMyWeb BlogMarks: Add This Mark! Furl: Save This Article Spurl: Mark This Article



· Simple PHP Tutorial
· One File Website
· Pagination with PHP
· Building a Comments Script
· Complete Members System
· Variable Scope

"" Copyright © 2002-2021; All rights lefted, all lefts righted.
Privacy Policy