-
Notifications
You must be signed in to change notification settings - Fork 0
/
r.php
19 lines (15 loc) · 614 Bytes
/
r.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
require_once('url_generator.php');
require_once('config.php');
$link = new shortener();
$code = $_GET["c"];
$url = $link->getUrlFromDb($code);
if(empty($url)){
echo "<div style='position: relative; top: 40%; text-align: center; width: 100%;'>LINK NOT FOUND!!</div>";
echo "<div style='position: relative; top: 40%; text-align: center; width: 100%;'>LINK NOT FOUND!!</div>";
echo "<div style='position: relative; top: 40%; text-align: center; width: 100%;'>LINK NOT FOUND!!</div>";
header('refresh: 3; url=index.php');
}else{
$conf = new config();
$conf->view('redirect', $url);
}