real_escape_string(strtolower(stripslashes(strip_tags($_GET['l'])))); $sql = "SELECT * FROM `links` WHERE `shortlink` = '$link' LIMIT 1;"; if($result = $shortdb->query($sql)){ if($row = $result->fetch_assoc()){ $link = $row['link']; header("location:$link"); exit(); // Stop script execution to save on resources } } } // New way to check for valid short links, two characters shorter than the if statement above if(!empty($_GET)){ $key = key($_GET); include('api/dbsettings.php'); $link = $shortdb->real_escape_string(strtolower(stripslashes(strip_tags($key)))); $sql = "SELECT * FROM `links` WHERE `shortlink` = '$link' LIMIT 1;"; if($result = $shortdb->query($sql)){ if($row = $result->fetch_assoc()){ $link = $row['link']; header("location:$link"); exit(); // Stop script execution to save on resources } } } ?> UnPS Link Shortener

Please give me a link to shorten...

Loading...