$location $hits ");
}
}
function dw_wik_url() {
$url = "https://davidawindham.com/wik/";
$url .= "?module=API&method=Actions.getPageUrls";
$url .= "&idSite=1&period=month&date=yesterday";
$url .= "&format=JSON&filter_limit=43";
$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
$fetched = file_get_contents($url);
$content = json_decode($fetched,true);
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(" $label $hits ");
}
}
function dw_wik_users() {
$url = "https://davidawindham.com/wik/";
$url .= "?module=API&method=DevicesDetection.getOsFamilies";
$url .= "&idSite=1&period=month&date=yesterday";
$url .= "&format=JSON&filter_limit=10";
$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
$fetched = file_get_contents($url);
$content = json_decode($fetched,true);
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(" $label $hits ");
}
}
function dw_wik_keys() {
$url = "https://davidawindham.com/wik/";
$url .= "?module=API&method=Referrers.getReferrerType";
$url .= "&idSite=1&period=month&date=yesterday";
$url .= "&format=JSON&filter_limit=20";
$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
$fetched = file_get_contents($url);
$content = json_decode($fetched,true);
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(" $label $hits ");
}
}
function dw_wik_refs() {
$url = "https://davidawindham.com/wik/";
$url .= "?module=API&method=Referrers.getAll";
$url .= "&idSite=1&period=month&date=yesterday";
$url .= "&format=JSON&filter_limit=20";
$url .= "&token_auth=3910b0da85f448ae35d4b75b4e6912bb";
$fetched = file_get_contents($url);
$content = json_decode($fetched,true);
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(" $label $hits ");
}
}
?>