Spiders should not be allowed, sometimes, to follow redirects via HTML (e.g. in banners)
authorRoland Häder <roland@mxchange.org>
Sun, 6 Dec 2009 14:23:28 +0000 (14:23 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 6 Dec 2009 14:23:28 +0000 (14:23 +0000)
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);