mirror of
https://github.com/gamaio/UnPS-Short.git
synced 2024-11-14 04:57:25 +00:00
Remove forward slashes
This is to hopefully be able to process unps.us/linkid instead of unps.us/?linkid
This commit is contained in:
parent
278829a641
commit
8112bfa43e
@ -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()){
|
||||
|
Loading…
Reference in New Issue
Block a user