diff --git a/index.php b/index.php
index 424a152..77f2c03 100644
--- a/index.php
+++ b/index.php
@@ -15,15 +15,16 @@ switch ($path) {
$error = false;
$target = null;
+$needs_confirmation = false;
try {
$links = new Links(".links.db", "links.sql");
- $target = $links->getTarget($path);
+ list($target, $needs_confirmation) = $links->getTarget($path);
$links->handleVisit($path);
} catch (Exception $exception) {
$error = true;
}
-if ($target != null) {
+if ($target != null && !$needs_confirmation) {
header("Location: {$target}");
exit();
}
@@ -88,20 +89,33 @@ if ($target != null) {
Something went wrong internally, and you could not be redirected. Please try again later.
Link not found
The short URL https://fwdkr.co= $path ?> could not be found.
- About fwdkr.co
- You've arrived at this page because you typed or linked to "fwdkr.co", the URL shortcut for
- fwdekker.com.
- Whenever you see a "fwdkr.co" link, you can trust that it will always take you to a website affiliated with
- FWDekker.
+ if ($target != null && $needs_confirmation) {
+ ?>
+ Confirm redirect
+ This URL redirects to = $target ?>.
+
+ Click here to proceed
+
+
+ About fwdkr.co
+ You've arrived at this page because you typed or linked to "fwdkr.co", the URL shortcut for
+ fwdekker.com.
+
+ Whenever you see a "fwdkr.co" link, you can trust that it will always take you to a website affiliated with
+ FWDekker.
+