Part: 2
- Create db.php file database connection
<?php
DEFINE('DATABASE_USER', 'root');
DEFINE('DATABASE_PASSWORD', '');
DEFINE('DATABASE_HOST', 'localhost');
DEFINE('DATABASE_NAME', 'demo');
$con = mysql_connect(DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD);
mysql_select_db(DATABASE_NAME, $con);
if (!$con) {
trigger_error('Could not connect to MySQL: ' . mysql_connect_error());
}
?>
Part: 3
- Create database to store secure links & tracking details
f_file: secure links | f_name: filereal name | f_size: file
size | f_user: u may use it to store your member name who downloads
| f_mby: its for who entry the secure links | f_dmby: Date of who
update entry links | f_hits: download counter | f_ip:
download IP | f_ddate: Date of download | f_date: Date of
entry links
CREATE TABLE IF NOT EXISTS `download` (
`no` int(1) NOT NULL AUTO_INCREMENT,
`f_file` varchar(50) DEFAULT NULL,
`f_name` varchar(50) DEFAULT NULL,
`f_size` tinytext,
`f_user` tinytext,
`f_mby` tinytext,
`f_dmby` tinytext,
`f_hits` tinytext,
`f_ip` tinytext,
`f_date` tinytext,
`f_ddate` tinytext,
PRIMARY KEY (`no`)
);
|