From 8bf926db1926665ad8a376971a6e35f33269b8d4 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 22 Nov 2023 16:32:46 +0100 Subject: handle video/audio/text mime types --- index.php | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 23c314f..c2bb48e 100644 --- a/index.php +++ b/index.php @@ -64,8 +64,37 @@ if (strpos($mime, 'text/gemini') === 0) { } } +else if (strpos($mime, 'text') === 0) { + echo $response->getBody(); +} + else if (strpos($mime, 'image') === 0) { - echo "getBody()) . "\">"; + $src = "data:{$mime};base64," . base64_encode($response->getBody()); + ?> + + getBody()); + ?> + + getBody()); + ?> + + "; -- cgit v1.2.3