mirror of
https://github.com/gamaio/lobli.git
synced 2024-12-22 19:52:40 +00:00
Add link tracking and require tracking function
Nothing special here. I think I'm supposed to echo those tracking functions though
This commit is contained in:
parent
2164dd856f
commit
c2dbb861d0
@ -23,6 +23,7 @@
|
||||
*/
|
||||
|
||||
require('Include/PHP/db.php');
|
||||
require('Include/PHP/functions.php');
|
||||
|
||||
// This has been depreciated. Still here for backwards compatibility with existing links
|
||||
if(!empty($_GET['l'])){
|
||||
@ -31,6 +32,8 @@
|
||||
$sql = "SELECT * FROM `links` WHERE `shortlink` = '$link' LIMIT 1;";
|
||||
if($result = $shortdb->query($sql)){
|
||||
if($row = $result->fetch_assoc()){
|
||||
tracking($sdb, $link);
|
||||
|
||||
$link = $row['link'];
|
||||
header("location:$link");
|
||||
exit(5); // Stop script execution to save on resources
|
||||
@ -51,6 +54,8 @@
|
||||
$sql = "SELECT * FROM `links` WHERE `shortlink` = '$link' LIMIT 1;";
|
||||
if($result = $shortdb->query($sql)){
|
||||
if($row = $result->fetch_assoc()){
|
||||
tracking($sdb, $link);
|
||||
|
||||
$link = $row['link'];
|
||||
header("location:$link");
|
||||
exit(5); // Stop script execution to save on resources
|
||||
|
Loading…
Reference in New Issue
Block a user