Skrypty statystyk Listy Dyskusyjnej Mandragoratu Wandystanu https://wandystan.eu/statistics/doc/
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

35 wiersze
1.2 KiB

  1. <?php
  2. /*
  3. * Outputs metadata of the sender
  4. * Copyright (C) 2020 Polyna <https://wandystan.eu/B196>
  5. *
  6. * This file is part of LDMW statistical scripts.
  7. *
  8. * LDMW statistical scripts are free software: you can redistribute them
  9. * and/or modify them under the terms of the GNU Affero General Public
  10. * License as published by the Free Software Foundation, either version 3
  11. * of the License, or (at your option) any later version.
  12. *
  13. * LDMW statistical scripts are distributed in the hope that they will be
  14. * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public
  19. * License along with LDMW statistical scripts. If not, see
  20. * <https://www.gnu.org/licenses/>.
  21. */
  22. require_once 'common.php';
  23. $hash = $_GET['hash'];
  24. if (! mb_ereg_match('^[0-9a-f]{8}$', $hash))
  25. exit_error('Invalid hash.');
  26. header('Content-type: application/ld+json');
  27. print json_encode([
  28. '@context' => 'https://wandystan.eu/statistics/context.jsonld',
  29. '@id' => 'sender/' . $hash,
  30. '@type' => 'Agent',
  31. 'name_fnv1a32sum' => $hash
  32. ]);