jimkoh
Wed 18 February 2009, 04:24 pm GMT +0100
Hi all
I am new here and new to php and javascript as well.
After reading some posts from Olaf regarding some similar problem I am facing, I wonder if anyone of you are able to help.
Olaf post:
First we need a database to store the file path, the IP address and the last download time:
CREATE TABLE IF NOT EXISTS `downloaded` (
`filepath` varchar(255) NOT NULL,
`ipadres` varchar(15) NOT NULL,
`last_access` datetime NOT NULL,
UNIQUE KEY `filepath` (`filepath`,`ipadres`),
KEY `ipadres` (`ipadres`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
How to go about doing this?
I want to setup a site that allows member to download some pdf, exe or zip files.
They are only allowed, says 100 files per month.
So if someone uses up his download quota beginning of the month, he will have to wait until the 1st of the next month before he can download from my site again. That means on the 1st of every month, at 0:0:00 hour, member's download quota will be refreshed.
Can this be done?
Here are my server and site details.
I am using a shared hosting server running on Linux, Apache 2.2.11 (Unix) PHP 5.2.5, MySQL 5.0.67-community.
Site hosted using Joomla 1.5.9
Will be glad if anyone can help.
Jim
I am new here and new to php and javascript as well.
After reading some posts from Olaf regarding some similar problem I am facing, I wonder if anyone of you are able to help.
Olaf post:
First we need a database to store the file path, the IP address and the last download time:
CREATE TABLE IF NOT EXISTS `downloaded` (
`filepath` varchar(255) NOT NULL,
`ipadres` varchar(15) NOT NULL,
`last_access` datetime NOT NULL,
UNIQUE KEY `filepath` (`filepath`,`ipadres`),
KEY `ipadres` (`ipadres`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
How to go about doing this?
I want to setup a site that allows member to download some pdf, exe or zip files.
They are only allowed, says 100 files per month.
So if someone uses up his download quota beginning of the month, he will have to wait until the 1st of the next month before he can download from my site again. That means on the 1st of every month, at 0:0:00 hour, member's download quota will be refreshed.
Can this be done?
Here are my server and site details.
I am using a shared hosting server running on Linux, Apache 2.2.11 (Unix) PHP 5.2.5, MySQL 5.0.67-community.
Site hosted using Joomla 1.5.9
Will be glad if anyone can help.
Jim