This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| urn [2025/10/12 18:26] – Yuki | urn [2025/10/12 22:34] (current) – Yuki | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <php> | ||
| - | if(isset($_GET[' | ||
| - | { | ||
| - | $urn = $_GET[' | ||
| - | $resolvers = [ | ||
| - | " | ||
| - | ]; | ||
| - | | ||
| - | foreach($resolvers as $key => $value){ | ||
| - | if(str_starts_with($urn, | ||
| - | header(" | ||
| - | echo $value($urn); | ||
| - | exit; | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | </ | ||
| - | |||
| ====== URN resolver ====== | ====== URN resolver ====== | ||
| < | < | ||
| < | < | ||
| function register(){ | function register(){ | ||
| - | navigator.registerProtocolHandler(" | + | navigator.registerProtocolHandler(" |
| } | } | ||
| </ | </ | ||
| <button onclick=register()> | <button onclick=register()> | ||
| </ | </ | ||