[thelist] Perl/PHP/mySQL required to download software?

Burhan Khalid burhankhalid at members.evolt.org
Thu Jun 6 18:09:01 CDT 2002

 I have designed and built a web site for a client who wants to sell
software online. A Buyer purchases the software, a third party will then
process the credit card information, send a confirming email to Buyer
and to my client. Once my client receives the payment confirmation he
will then generate a customized registration number based on the Buyer's
registration name so the number will be completely personalized. Client
also will generate a personalized copy of the program using the
registration number and also use the registration number as a password
to allow the customer to download their personalized copy of the program
from Client's web site.

I have the download set up now as a form showing an email address and
buyer's User ID # text area boxes. My problem is determining what
backend stuff needs to be set up to hold this information and call the
appropriate registration number (User ID #) program for each buyer to

Depending on how your client has their setup. It might be as simple as a
csv file which contains the pertinent information.
An example :

buyerEmail | buyerUID | FileLocation

You could then read this information and generate have the browser
download the appropriate file to the user. This is assuming that for
each buyer there is a different file name (which is what I understood
from "client will also generate a personalized copy..."). After you
determine that the file has been downloaded properly, you can delete the
appropriate entry from the csv file.

Another approach would be using a database, with the following structure

Buyer Information			UIDList		DLList
-----------------			-------		------
Email (PID)				UID			UID
Name  (optional)			ExpDate		PrgName

With this structure, you can setup a few SQL statements that will query
the tables for the appropriate information. An additional benefit of the
database setup (there are so many) is that you can generate reports
(based on each customer), and can delete transactions that have already
taken place (so someone can't keep downloading copies, etc.)

I have a form coded that calls something from the cgi-bin but I don't
know what that something consists of. I was looking at some other sites
to see how folks did this and that's where I got the code. I see the
code but I don't understand it. Example I found: <form method="get"
action="http://www.xxxxx.com/cgi-bin/hscdl">. What does hscdl mean?

Don't know about this one -- could mean anything.


More information about the thelist mailing list