Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
753B

  1. <?php
  2. require_once('include/Scrape.php');
  3. function probe_content(App $a) {
  4. if (!local_user()) {
  5. http_status_exit(403, array("title" => t("Public access denied."),
  6. "description" => t("Only logged in users are permitted to perform a probing.")));
  7. killme();
  8. }
  9. $o .= '<h3>Probe Diagnostic</h3>';
  10. $o .= '<form action="probe" method="get">';
  11. $o .= 'Lookup address: <input type="text" style="width: 250px;" name="addr" value="' . $_GET['addr'] . '" />';
  12. $o .= '<input type="submit" name="submit" value="Submit" /></form>';
  13. $o .= '<br /><br />';
  14. if (x($_GET, 'addr')) {
  15. $addr = trim($_GET['addr']);
  16. $res = probe_url($addr);
  17. $o .= '<pre>';
  18. $o .= str_replace("\n", '<br />', print_r($res, true));
  19. $o .= '</pre>';
  20. }
  21. return $o;
  22. }