Skip to content

Instantly share code, notes, and snippets.

@sorenpeter
sorenpeter / webmention.php
Created March 16, 2024 22:15 — forked from adactio/webmention.php
Minimum viable webmention in PHP.
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
if (!isset($_POST['source']) || !isset($_POST['target'])) {
header($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
exit;
}