]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Spiders should not be allowed, sometimes, to follow redirects via HTML (e.g. in banners)
[mailer.git] / inc / functions.php
index 0dbe4ae0d2d9d5a42584d474a7022b02888eda26..aec4292947292056a13ef0e07a90f79f041aee33 100644 (file)
@@ -922,7 +922,7 @@ function makeTime ($hours, $minutes, $seconds, $stamp) {
 }
 
 // Redirects to an URL and if neccessarry extends it with own base URL
-function redirectToUrl ($URL) {
+function redirectToUrl ($URL, $allowSpider = true) {
        // Compile out codes
        eval('$URL = "' . compileRawCode(encodeUrl($URL)) . '";');
 
@@ -941,7 +941,7 @@ function redirectToUrl ($URL) {
        //* DEBUG: */ die($URL);
 
        // Simple probe for bots/spiders from search engines
-       if (isSpider()) {
+       if ((isSpider()) && ($allowSpider === true)) {
                // Secure the URL against bad things such als HTML insertions and so on...
                $URL = secureString($URL);