]> git.mxchange.org Git - ctracker.git/blobdiff - libs/lib_general.php
Continued improving:
[ctracker.git] / libs / lib_general.php
index 8d5dd1e93ae268deb63ba850cc1d3d0b5cc8f519..4180c9d75a52685a05f610847b968d47d6b6dfe4 100644 (file)
@@ -150,7 +150,7 @@ function crackerTrackerUserAgent () {
        // Is the entry there?
        if (isset($_SERVER['HTTP_USER_AGENT'])) {
                // Then use it securely
-               $ua = crackerTrackerSecureString($_SERVER['HTTP_USER_AGENT']);
+               $ua = crackerTrackerSecureString(urldecode($_SERVER['HTTP_USER_AGENT']));
        } // END - if
 
        // Return it
@@ -199,7 +199,7 @@ function crackerTrackerReferer () {
        $referer = '-';
 
        // Is it there?
-       if (isset($_SERVER['HTTP_REFERER'])) {
+       if (!empty($_SERVER['HTTP_REFERER'])) {
                // Then use it securely
                $referer = crackerTrackerSecureString(urldecode($_SERVER['HTTP_REFERER']));
        } // END - if
@@ -208,6 +208,21 @@ function crackerTrackerReferer () {
        return $referer;
 }
 
+// Detects request method
+function crackerTrackerRequestMethod () {
+       // Default is NULL
+       $method = NULL;
+
+       // Is it set?
+       if (!empty($_SERVER['REQUEST_METHOD'])) {
+               // Then use it
+               $method = $_SERVER['REQUEST_METHOD'];
+       } // END - if
+
+       // Return it
+       return $method;
+}
+
 // Detects the scripts path
 function crackerTrackerScriptPath () {
        // Should always be there!
@@ -514,8 +529,9 @@ function unsetCtrackerData () {
                        'ctracker_post_blacklist',
                        'ctracker_header',
                        'ctracker_post_track',
-                       'ctracker_checkworm',
-                       'ctracker_check_post',
+                       'ctracker_checked_get',
+                       'ctracker_checked_post',
+                       'ctracker_checked_ua',
                        'ctracker_last_sql',
                        'ctracker_last_result',
                        'ctracker_config',