Answer the question
In order to leave comments, you need to log in
How to fix error in php redirect script?
Tell me where I made a mistake. How to fix the script. Thanks
$uri = trim(strip_tags($_SERVER['REQUEST_URI']));
$links = file('redlink.txt');
shuffle($links);
$test = $links[0];
$test2 = $test.uri;
header('HTTP/1.1 301 Moved Temporarily');
header('Location: '.$test2);
Answer the question
In order to leave comments, you need to log in
$test2 = trim($test) . $uri;
Unless, of course, you really want to add a random line from the redlink.txt file before $uri.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question