KXStudio Website https://kx.studio/
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.

29 lines
876B

  1. <?php
  2. define('TRACKBACK', true);
  3. require_once "common.php";
  4. if (!$config->enable_trackbacking)
  5. exit;
  6. $post = new Post($_GET['id']);
  7. if (empty($_POST['title']) and empty($_POST['url']) and empty($_POST['blog_name']))
  8. redirect($post->url());
  9. if (!Post::exists($_GET['id']))
  10. trackback_respond(true, __("Fake post ID, or nonexistant post."));
  11. if (!empty($_POST['url'])) {
  12. header('Content-Type: text/xml; charset=utf-8');
  13. $url = strip_tags($_POST['url']);
  14. $title = strip_tags($_POST['title']);
  15. $excerpt = strip_tags($_POST['excerpt']);
  16. $blog_name = strip_tags($_POST['blog_name']);
  17. $excerpt = truncate($excerpt, 255);
  18. $title = truncate($title, 250);
  19. $trigger->call("trackback_receive", $url, $title, $excerpt, $blog_name);
  20. trackback_respond();
  21. }