dashboard.php 677 B

1234567891011121314151617181920212223242526
  1. <?php
  2. function dw_wik_places() {
  3. $token_auth = 'd97e3e8f34071515ad1f6e345f6035af';
  4. $url = "https://davidawindham.com/wik/";
  5. $url .= "?module=API&method=UserCountry.getCity";
  6. $url .= "&idSite=1&period=month&date=yesterday";
  7. $url .= "&format=PHP&filter_limit=20";
  8. $url .= "&token_auth=$token_auth";
  9. $fetched = file_get_contents($url);
  10. $content = unserialize($fetched);
  11. if (!$content) {
  12. print("Error, content fetched = " . $fetched);
  13. }
  14. foreach ($content as $row) {
  15. $keyword = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
  16. $hits = $row['nb_visits'];
  17. print("<b>$keyword</b> ($hits hits)<br>\n");
  18. }
  19. }
  20. ?>