From ebd7fb527d7c2e5d21a82cd88898bb31473bfbcb Mon Sep 17 00:00:00 2001
From: David Dickinson <36966460+rnddave@users.noreply.github.com>
Date: Tue, 14 May 2024 09:54:29 +0100
Subject: [PATCH] adding the PHP files for live testing
---
index.php | 41 +++++++++++++++++++++++++++++++++++++++++
qr-generator.php | 32 ++++++++++++++++++++++++++++++++
2 files changed, 73 insertions(+)
create mode 100644 index.php
create mode 100644 qr-generator.php
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..2642c26
--- /dev/null
+++ b/index.php
@@ -0,0 +1,41 @@
+
+
+
+ QR Code Generator
+
+
+
+ QR Code Generator
+
+
+ ";
+ }
+ ?>
+
+
\ No newline at end of file
diff --git a/qr-generator.php b/qr-generator.php
new file mode 100644
index 0000000..f66b3dd
--- /dev/null
+++ b/qr-generator.php
@@ -0,0 +1,32 @@
+setErrorCorrectionLevel(new ErrorCorrectionLevelLow())
+ ->setRoundBlockSizeMode(new RoundBlockSizeModeMargin())
+ ->setForegroundColor(new Color(0, 0, 0))
+ ->setBackgroundColor(new Color(255, 255, 255))
+ ->setLabel('My QR Code')
+ ->setLogoPath(__DIR__ . '/logo.png');
+
+// Save the QR code as a PNG image
+$result = $writer->write($qrCode);
+header('Content-Type: ' . $result->getMimeType());
+echo $result->getString();
\ No newline at end of file