-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.php
More file actions
36 lines (27 loc) · 879 Bytes
/
bootstrap.php
File metadata and controls
36 lines (27 loc) · 879 Bytes
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
36
<?php
//include_once 'Autoload.php';
//new Autoload();
$s = simplexml_load_file('local.xml');
//var_dump($s);
//var_dump($s->global->resources->default_setup->connection->host);
$mysqli = new mysqli($s->global->resources->default_setup->connection->host,$s->global->resources->default_setup->connection->username,$s->global->resources->default_setup->connection->password,$s->global->resources->default_setup->connection->dbname);
//var_dump($mysqli);
/*
* CREATE/MODIFY LOG FILES
*/
$text = '';
$d = date('Y-m-d');
if(!file_exists('logs/'.$d)) {
touch('logs/'.$d);
}else {
$text = file_get_contents('logs/'.$d);
}
$timestamp = time();
$ip = $_SERVER['REMOTE_ADDR'];
$url = $_SERVER['PHP_SELF'];
$sid = session_id();
$text .= "$timestamp\t$ip\t$url\t$sid\n";
$fhandle = fopen('logs/'.$d,'r+');
fwrite($fhandle,$text);
var_dump($_COOKIE);
//var_dump($_SESSION);