From c2dbb861d047c77255b76b463fcbedcf46789d9b Mon Sep 17 00:00:00 2001 From: alopexc0de Date: Thu, 3 Jul 2014 15:20:13 -0400 Subject: [PATCH] Add link tracking and require tracking function Nothing special here. I think I'm supposed to echo those tracking functions though --- Website/index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Website/index.php b/Website/index.php index 5ce5e43..003a466 100644 --- a/Website/index.php +++ b/Website/index.php @@ -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