diff --git a/Website/process.php b/Website/process.php
index 6bd689d..b064ee0 100644
--- a/Website/process.php
+++ b/Website/process.php
@@ -45,17 +45,37 @@
- ",
- "
-
- Your link:
- $link is not a lob.li link and has not been shortened.
-
"
);
require('Include/PHP/functions.php');
+ if(isset($_GET['resolve']) && !empty($_POST['link'])){
+ if(empty($_GET['token']) || $_GET['token'] != $_SESSION['token'] || empty($_POST[$catchid]) || $_POST[$catchid] != $catchVal){
+ die("Oh Noes! Something happened and I can't continue.
Please try again by using the form located at
lob.li.
");
+ }
+
+ $link = $_POST['link'];
+ $trTtl = $redis->ttl("links:$link");
+ if($trTtl == -2){ // Didn't find links:linkid, checking if long link
+ $trTtl = $redis->ttl("llinks:$link");
+ if($trTtl == -2){ // Didn't find that either, give error
+ echo "
+
+ Your link:
+ $link is not a lob.li link and has not been shortened.
+
+ ";
+ exit;
+ }
+ }
+
+ $short = $redis->lRange("links:$link", 0, 1);
+ print_r($short); exit;
+
+
+ }
+
if(!empty($_POST['link']) || !empty($_POST['linkage'])){
if(empty($_GET['token']) || $_GET['token'] != $_SESSION['token'] || empty($_POST[$catchid]) || $_POST[$catchid] != $catchVal){
die("Oh Noes! Something happened and I can't continue.
Please try again by using the form located at
lob.li.
");