Skip to content
This repository was archived by the owner on Apr 9, 2023. It is now read-only.

Commit bb3ad57

Browse files
committed
Add support for more SQL databases
+ Bugfixes + Adding prefix to table names + Using PDO instead of mysqli
1 parent ada12a8 commit bb3ad57

4 files changed

Lines changed: 105 additions & 189 deletions

File tree

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ There are atleast 4 reasons:
99
* **it's free**
1010

1111
## Usage
12-
* Place webanalytics.php and websettings.php in the same directory as your own php scripts, and modify the mysql parameters (user, password, database, host) in websettings.php. (Recommended, makes updates easier)
12+
* Place webanalytics.php and websettings.php in the same directory as your own php scripts, and modify the database parameters in websettings.php.
1313
#### OR
14-
* Place only webanalytics in the same directory as your own php scripts and modify the mysql parameters (user, password, database, host) in webanalytics.php.
14+
* Place only webanalytics.php in the same directory as your own php scripts and modify the database parameters in webanalytics.php.
1515

1616
websettings.php / webanalytics.php
1717
```php
18-
$web_analytics_db = new web_db_manager("user", "password", "database", "localhost");
18+
$web_analytics_db = new web_db_manager("mysql:dbname=database;host=127.0.0.1", "user", "password");
1919
```
2020

2121
After that all you need to do is including webanalytics.php in your own php scripts to start collecting data:
@@ -34,7 +34,6 @@ To run web analytics manually use following code:
3434
```php
3535
$web_analytics_db->connect();
3636
$web_analytics = new web_analytics($web_analytics_db, $_SERVER, $_COOKIE);
37-
$web_analytics_db->close();
3837
```
3938

4039
As a professional you might also want to try our yet experimental JavaScript for collecting additional data:
@@ -44,7 +43,7 @@ As a professional you might also want to try our yet experimental JavaScript for
4443

4544
## Requirements
4645
* PHP 5.0 or higher
47-
* a MySQL Server
46+
* a database server with PDO driver
4847
* (a webserver of course)
4948

5049
### PLEASE NOTE: WebAnalytics is still in development. We rely on your feedback!

0 commit comments

Comments
 (0)