-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.php.example
More file actions
167 lines (141 loc) · 4.73 KB
/
Copy pathconfig.php.example
File metadata and controls
167 lines (141 loc) · 4.73 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?php
/*
* Database credentials
*/
$dbuser = "";
$dbpass = "";
$database = "twittercapture";
$hostname = "localhost";
/*
* Capturing role(s) for DMI-TCAT
* Here you can define which types of capturing you would like to do
* Possible values are "track", "follow", "onepercent".
* Note that you can only do one of track, follow or onepercent per IP address and capturing key
*/
define("CAPTUREROLES", serialize(array("track")));
/*
* The user who can add and modify query bins.
* This user should exist in your htaccess authentication
* Leave empty if you do not want to restrict access to the query manager - which, of course, is a security risk
*/
define("ADMIN_USER", "admin");
/*
* *Super advanced and currently undocumented feature, leave settings as they are*
* We have made it possible to tunnel Twitter API connections through other hosts (obtaining a different source IP address), and use multiple keysets for multiple streaming queries.
* Each capture script should define its role, see define("CAPTUREROLES",serialize(array()))
* Every distinct role should then get a different network path below
*
*/
$GLOBALS["HOSTROLE"] = array(
'track' => "https://stream.twitter.com/",
'follow' => "https://stream.twitter.com/",
'onepercent' => "https://stream.twitter.com/",
);
/*
* Mail address to report critical errors to
*/
$mail_to = "";
/*
* Twitter API keys
*/
// Main keyring, used for capturing from streaming API
// Make sure you have a key for each capture role defined in CAPTUREROLES above
if (!defined('CAPTURE') || !strcmp(CAPTURE, "track")) {
$twitter_consumer_key = "";
$twitter_consumer_secret = "";
$twitter_user_token = "";
$twitter_user_secret = "";
} elseif (!strcmp(CAPTURE, "follow")) {
$twitter_consumer_key = "";
$twitter_consumer_secret = "";
$twitter_user_token = "";
$twitter_user_secret = "";
} elseif (!strcmp(CAPTURE, "onepercent")) {
$twitter_consumer_key = "";
$twitter_consumer_secret = "";
$twitter_user_token = "";
$twitter_user_secret = "";
}
// List of additional keys to loop over when there is a limited amount of requests per key, e.g. search
// twitter_keys is an array of arrays listing different Twitter API keys
$twitter_keys = array(
array("twitter_consumer_key" => "",
"twitter_consumer_secret" => "",
"twitter_user_token" => "",
"twitter_user_secret" => "",
)
);
/*
* Klout account info (optional)
*/
$kloutapi_key = "";
/*
* file root in which dmi-tcat resides
*/
define('BASE_FILE', '/var/www/dmi-tcat/');
/*
* URL root in which dmi-tcats resides
*/
define('BASE_URL', 'http://example.com/dmi-tcat/');
/*
* URL root in which analysis resides
*/
define('ANALYSIS_URL', BASE_URL . 'analysis/');
/*
* When no database activity has occured for IDLETIME seconds during a track, the controller restarts the process. Do not set this too low,
* as there is caching before we insert. Usually the default is fine.
*/
define('IDLETIME', 600);
/*
* To avoid excessive verbosity, assume a minimal length of ratetime disturbance (heartbeat) in seconds
*/
define('RATELIMIT_SILENCE', 300);
/*
* Report rate limit problems to the administrator every x hours ( 0 = no mail reporting )
*/
define('RATELIMIT_MAIL_HOURS', 24);
/*
* Time zone
*/
date_default_timezone_set("Europe/London");
/*
* Error reporting verbosity
*/
error_reporting(E_ALL & ~E_DEPRECATED);
/*
* How long the script is allowed to run
*/
ini_set("max_execution_time", 3600);
/*
* How much memory the script is allowed to take
*/
ini_set("memory_limit", "2G");
/*
* Set encoding
*/
mb_internal_encoding("UTF-8");
/*
* set location of php
* find the location by typing 'which php' on the command line of your terminal
*/
define("PHP_CLI", "/usr/bin/php");
/*
* Use mysql INSERT DELAYED statements to insert data into the MySQL database.
* Recommended only for high-load sites, who may have nightly backupscripts locking database tables.
* Make sure to adjust the MySQL server variables delayed_queue_size, max_delayed_threads to an appropriate sizes.
* Experts only.
*/
define('USE_INSERT_DELAYED', false);
/*
* Set to true, if you want all insert statements to fail on errors. Even though such errors are caught and reported,
* setting this option on a production site is not recommended, since we are using multi-insert statements and all tweets
* in such an insert will be lost on errors.
* Developers only.
*/
define('DISABLE_INSERT_IGNORE', false);
/*
* This is the github API URL used to check whether your current DMI-TCAT install is up-to-date (assuming you are using git).
* You will want to change this only when you have forked the repository.
*/
define('REPOSITORY_URL', 'https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/commits');
?>