-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
79 lines (73 loc) · 1.42 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<?php
namespace Fn\WebtCoreComposerForPhpProjects;
require './src/QRCode.php';
require './vendor/autoload.php';
?>
<html>
<head>
<meta charset="UTF-8">
<title>QRCode</title>
<style>
body {
background-color: #282828;
color: white;
font-family: 'Arial', sans-serif;
}
h1 {
text-align: center;
font-size: 48px;
margin-top: 50px;
margin-bottom: 50px;
text-transform: uppercase;
letter-spacing: 2px;
}
form {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 50px;
}
input {
padding: 10px;
border: none;
background-color: #404040;
color: white;
margin-right: 10px;
margin-bottom: 10px;
border-radius: 5px;
width: 300px;
}
button {
padding: 10px;
border: none;
background-color: #0099cc;
color: white;
border-radius: 5px;
cursor: pointer;
width: 100px;
}
button:hover {
background-color: #006699;
}
img {
display: block;
margin: 0 auto;
max-width: 100%;
}
</style>
</head>
<body>
<h1>GenerateQR-Code</h1>
<form method="get">
<input type="tel" name="phone" placeholder="Phonenumber">
<button type="submit">Generate</button>
</form>
<?php
if (isset($_GET['phone'])) {
$QR = new QRCode($_GET['phone'], 300);
echo '<img src="' . $QR->getURI() . '" />';
}
?>
</main>
</body>
</html>