forked from simonsickle-old/DirectoryLister
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.php
35 lines (30 loc) · 754 Bytes
/
install.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
//YOU MUST SET THE VARIABLES BELOW OR IT WONT WORK
$hostname = '';
$username = '';
$password = '';
$con = mysql_connect($hostname,$username,$password);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
if (mysql_query("CREATE DATABASE FileDownloads",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_select_db("FileDownloads", $con);
$sql = "CREATE TABLE downloadkey
(
uniqueid varchar(255) NOT NULL default '',
timestamp varchar(255) NOT NULL default '',
filename varchar(255) NOT NULL default '',
downloads varchar(255) NOT NULL default '0',
)";
mysql_query($sql,$con);
mysql_close($con);
echo "WARNING YOU MUST REMOVE THIS FILE OR SUFFER THE CONSEQUINCES!!!"
?>