Here's the code, (kept as basic as humanly possible), for it.
The first file, include/annoy_arrays.php
<?php
// Get a random number to decide what we are going to do
$randnum = rand(1, 30);
// Get delay time for page loads/redirects
$delay = rand(1, 30);
// Redirect to another page/site settings
$rdirtrue = array(8, 13, 15);
$rdirnum = rand(1, 3);
$rdir_array = array();
$rdir_array[1] = 'help.php';
$rdir_array[2] = 'index.php';
$rdir_array[3] = 'forums.php';
// Error settings
$errortrue = array(1, 6, 23);
// Blank page settings
$blanktrue = array(2, 11, 19, 26);
// Generic load delay setting
$delaytrue = array(9, 16, 27);
?>
The second file, annoy.php
<?php
define('PUN_ROOT', './');
include PUN_ROOT.'include/annoy_arrays.php';
if (in_array($randnum, $rdirtrue))
{
sleep($delay);
header("Location: $rdir_array[$rdirnum]");
}
else if (in_array($randnum, $errortrue))
{
sleep($delay);
?>
<style type="text/css">
.middle {
text-align: center;
}
</style>
</head>
<body>
<div class="block">
<h2><span>Error</span></h2>
<div class="box">
<div class="inbox">
<p class="middle"><b>Page not found</b></p>
</div>
</div>
</div>
</body>
</html>
<?php
exit;
}
else if (in_array($randnum, $blanktrue))
{
?>
</head>
<body>
<div class="clearer"></div>
</body>
</html>
<?php
exit;
}
else if (in_array($randnum, $delaytrue))
{
sleep($delay);
}
?>
The code to be inserted in header.php if the cookie alterations above are used:
// Which group id's will have the annoy script called
$annoy_array = array(6);
if ($pun_user['is_guest'] && isset($_COOKIE[$cookie_name]))
{
list(, , $header['group_id']) = @unserialize($_COOKIE[$cookie_name]);
}
if (isset($annoy_array) && (in_array($pun_user['g_id'], $annoy_array) || in_array(intval($header['group_id']), $annoy_array)))
{
require_once PUN_ROOT.'annoy.php';
}
The code to be inserted in header.php without the cookie alterations above:
// Which group id's will have the annoy script called
$annoy_array = array(6);
if (isset($annoy_array) && in_array($pun_user['g_id'], $annoy_array))
{
require_once PUN_ROOT.'annoy.php';
}