You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 9, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,13 @@ There are atleast 4 reasons:
9
9
***it's free**
10
10
11
11
## 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.
13
13
#### 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.
15
15
16
16
websettings.php / webanalytics.php
17
17
```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");
19
19
```
20
20
21
21
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:
34
34
```php
35
35
$web_analytics_db->connect();
36
36
$web_analytics = new web_analytics($web_analytics_db, $_SERVER, $_COOKIE);
37
-
$web_analytics_db->close();
38
37
```
39
38
40
39
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
44
43
45
44
## Requirements
46
45
* PHP 5.0 or higher
47
-
* a MySQL Server
46
+
* a database server with PDO driver
48
47
* (a webserver of course)
49
48
50
49
### PLEASE NOTE: WebAnalytics is still in development. We rely on your feedback!
0 commit comments