Search
Left Quote    If at first you don't succeed, redefine success.
- Anon.    
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.

download.php



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  |  


Comments:

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

Will you plz send me the zip pack of Accept Coupon Codes for Downloads with all the files.
  bs0d
  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

40,043 Views
4 Total Comments
3 Rating of 5 (1 Votes)

Options

Tutorial Options

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

Articles

Related    

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



"AllSyntax.com" Copyright © 2002-2017; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank