Remove forward slashes

This is to hopefully be able to process unps.us/linkid instead of
unps.us/?linkid
This commit is contained in:
alopexc0de 2014-05-07 19:17:13 -05:00
parent 278829a641
commit 8112bfa43e
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,7 @@
if(!empty($_GET['l'])){
include('api/dbsettings.php');
$link = $shortdb->real_escape_string(strtolower(stripslashes(strip_tags($_GET['l']))));
$link = str_replace('/', '', $link);
$sql = "SELECT * FROM `links` WHERE `shortlink` = '$link' LIMIT 1;";
if($result = $shortdb->query($sql)){
if($row = $result->fetch_assoc()){
@ -32,6 +33,7 @@
$key = key($_GET);
include('api/dbsettings.php');
$link = $shortdb->real_escape_string(strtolower(stripslashes(strip_tags($key))));
$link = str_replace('/', '', $link);
$sql = "SELECT * FROM `links` WHERE `shortlink` = '$link' LIMIT 1;";
if($result = $shortdb->query($sql)){
if($row = $result->fetch_assoc()){