|
@@ -18,15 +18,108 @@ function dw_wik_places() {
|
|
|
foreach ($content as $row) {
|
|
|
$location = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
|
|
|
$hits = $row['nb_visits'];
|
|
|
- $actions = $row['nb_actions'];
|
|
|
$logo = $row['logo'];
|
|
|
$length = $row['sum_visit_length'];
|
|
|
- print("<li class='list-group-item'><img src='https://davidawindham.com/wik/$logo'/> $location ( $hits hits ) <span class='badge'> $actions </span></li>");
|
|
|
+ print("<li class='list-group-item small'><img src='https://davidawindham.com/wik/$logo'/> $location <span class='badge'> $hits </span></li>");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function dw_wik() {
|
|
|
+
|
|
|
+function dw_wik_url() {
|
|
|
|
|
|
+ $url = "https://davidawindham.com/wik/";
|
|
|
+ $url .= "?module=API&method=Actions.getPageUrls";
|
|
|
+ $url .= "&idSite=1&period=month&date=yesterday";
|
|
|
+ $url .= "&format=PHP&filter_limit=20";
|
|
|
+ $url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
|
|
|
+
|
|
|
+ $fetched = file_get_contents($url);
|
|
|
+ $content = unserialize($fetched);
|
|
|
+
|
|
|
+ if (!$content) {
|
|
|
+ print("Error, content fetched = " . $fetched);
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($content as $row) {
|
|
|
+ $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
|
|
|
+ $label = $row['label'];
|
|
|
+ $hits = $row['nb_hits'];
|
|
|
+ $time = $row['avg_time_on_page'];
|
|
|
+ print("<li class='list-group-item small'> <a href='https://davidawindham.com/$label'>$label</a> <span class='badge'> $hits </span></li>");
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function dw_wik_users() {
|
|
|
+
|
|
|
+ $url = "https://davidawindham.com/wik/";
|
|
|
+ $url .= "?module=API&method=UserSettings.getConfiguration";
|
|
|
+ $url .= "&idSite=1&period=month&date=yesterday";
|
|
|
+ $url .= "&format=PHP&filter_limit=10";
|
|
|
+ $url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
|
|
|
+
|
|
|
+ $fetched = file_get_contents($url);
|
|
|
+ $content = unserialize($fetched);
|
|
|
+
|
|
|
+ if (!$content) {
|
|
|
+ print("Error, content fetched = " . $fetched);
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($content as $row) {
|
|
|
+ $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
|
|
|
+ $label = $row['label'];
|
|
|
+ $hits = $row['nb_visits'];
|
|
|
+ print("<li class='list-group-item small'> $label <span class='badge'> $hits </span></li>");
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function dw_wik_keys() {
|
|
|
+
|
|
|
+ $url = "https://davidawindham.com/wik/";
|
|
|
+ $url .= "?module=API&method=Referrers.getKeywords";
|
|
|
+ $url .= "&idSite=1&period=month&date=yesterday";
|
|
|
+ $url .= "&format=PHP&filter_limit=20";
|
|
|
+ $url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
|
|
|
+
|
|
|
+ $fetched = file_get_contents($url);
|
|
|
+ $content = unserialize($fetched);
|
|
|
+
|
|
|
+ if (!$content) {
|
|
|
+ print("Error, content fetched = " . $fetched);
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($content as $row) {
|
|
|
+ $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
|
|
|
+ $label = $row['label'];
|
|
|
+ $hits = $row['nb_visits'];
|
|
|
+ print("<li class='list-group-item small'> $label <span class='badge'> $hits </span></li>");
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function dw_wik_refs() {
|
|
|
+
|
|
|
+ $url = "https://davidawindham.com/wik/";
|
|
|
+ $url .= "?module=API&method=Referrers.getAll";
|
|
|
+ $url .= "&idSite=1&period=month&date=yesterday";
|
|
|
+ $url .= "&format=PHP&filter_limit=20";
|
|
|
+ $url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
|
|
|
+
|
|
|
+ $fetched = file_get_contents($url);
|
|
|
+ $content = unserialize($fetched);
|
|
|
+
|
|
|
+ if (!$content) {
|
|
|
+ print("Error, content fetched = " . $fetched);
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach ($content as $row) {
|
|
|
+ $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
|
|
|
+ $label = $row['label'];
|
|
|
+ $hits = $row['nb_visits'];
|
|
|
+ print("<li class='list-group-item small'> $label <span class='badge'> $hits </span></li>");
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|