cgi scripts 4 u

Email Us

The Moneybookers Download cgi script allows your visitors to pay for your software via Moneybookers and once the payment has been authorised by Moneybookers the script is emailed to them

The perl script requires that you have the Digest::MD5, CGI and DBI perl modules installed on your server and you have a MySQL database.

You must create 2 tables in your database :

The first table is used to store your software details and must consist of the following columns

  • id = an integer type column, set as a primary key and auto_increment
  • filename = a varchar type column which contains the name of your software ie 'Moneybookers Download'
  • price = a decimal type column that contains the price of the software
  • pathtoscript = a varchar type column which contains the full path to the file that is to be emailed ie '/path/to/moneybookersdl.tar.gz'
  • scriptname = a varchar type column that contains the name of the file being purchased ie 'moneybookersdl.tar.gz
  • download = an integer type column which should be initially set to 0
This table can have additional columns if you wish for your own use but the above columns are the only ones that the script will use. You should then enter the details of each of the items you are selling on your site into this table.

The second table is used to track purchases and must consist of the following columns.

  • id = an integer type column, set as a primary key and auto_increment
  • amount_paid = a decimal type column which stores the amount paid for the software
  • mb_transaction_id = an intiger type column and stores the moneybookers transaction id
  • email = a varchar type column which stores the email address of the person paying for the software. This is the email address the buyer entered on the Moneybookers website and where the software is emailed.
  • file = is the id number that refers to the software that has been purchased.
This table can have additional columns if you wish for your own use but the above columns are the only ones that the script will use.

The formatting of the forms is totally down to you. You can either design the html and include the tag %%output%% where you would like for forms placed and save it as moneybookersdl.html and when the script is called directly via the browser the user will be asked to select the software they wish to purchase from a dropdown list (demo here) or you can hardcode the form into your existing html pages as we have on this page.

Now it's time to configure the script. There are a few variables at the beginning of the script that you need to set, these include setting your Moneybookers email address etc.