}
// 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)) . '";');
//* 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);