-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcron.php
36 lines (34 loc) · 1.11 KB
/
cron.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
36
<?php
$api_url = "https://wahl-2021.eu/stats/api.php";
$parties = ["spd","linke","cdu","afd","gruene","fdp","csu"];
$views = [
'tweets-per-day' => array(),
'tweets-per-hour' => array(),
'current-hashtags' => array(),
'hashtags-over-time' => array(),
'tweets-per-hour-per-search' => array(),
'current-hashtags-by-party' => array(
'party' => $parties
),
'current-hashtags-by-party-candidate' => array(
'party' => $parties
),
'current-hashtags-by-party-account' => array(
'party' => $parties
),
'current-domains-by-party' => array(
'party' => $parties
),
];
foreach ($views as $view => $config){
if (sizeof($config)){
foreach ($config as $param => $values){
foreach ($values as $value){
file_get_contents($api_url.'?forceLive=1&view='.$view.'&'.$param."=".$value);
}
}
} else {
file_get_contents($api_url.'?forceLive=1&view='.$view);
}
}
?>